[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] date of birth - how to handle

From: Sebastian Hilbert
Subject: [Gnumed-devel] date of birth - how to handle
Date: Mon, 5 Jul 2010 13:07:02 +0200
User-agent: KMail/1.13.3 (Linux/2.6.33-6-desktop; KDE/4.4.3; i686; ; )

I am in the process of writing the dob of a patient to a XML file.
gmCurrentPatient returns a datetime object. Different from a database backend 
I cannot store the object in a XML file. I therefore convert it with 

pat['dob'].strftime("%x"). This works and puts out a locale formated string 
representation. I wonder if there is a way to determine the format datetime 
has used in this very case (DDMMYYYY or MMDDYY) ?  

When reading in the XML files I need to convert the string representation into 
a date (e.g. for examination date).

Which is the best format for storage and reconverting it into a datetime 
object ?

I would like to store and read the format used from the XML tag's property. 
How do I get the format used ? I would like to avoid hardcoding the format.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]