maybe useful : datetime conversion

S

Stef Mientki

hello,

using datetimes from a lot of different sources,
in many languages,
I had about 30 python helper routines,
which I now packed in one class,
much simpler.
Although I used the Delphi date-format as the base,
it shouldn't be difficult to rewrite the class for another type.

The input can be one of the following types :
- None : the current date-time is used
- 30000.9 : a Delphi datetime
- 30000 : a Delphi datetime
- "30000.9" : a Delphi datetime as a string
- "30000,9" : a Delphi datetime as a (Dutch) string
- "20-5-11" : short year notation
- "20-05-2011" : long year notation
- "2009-09-24 10:12:24" : Access string
- datetime.datetime ( 2011, 1, 15 )
- time.struct_time
- wx.DateTime
- time.time() (through method from_time)

Maybe someone can use it.

cheers,
Stef
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top