Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5869
| Date | 2011-05-20 20:27 +0200 |
|---|---|
| From | Stef Mientki <stef.mientki@gmail.com> |
| Subject | maybe useful : datetime conversion |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1851.1305916080.9059.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
maybe useful : datetime conversion Stef Mientki <stef.mientki@gmail.com> - 2011-05-20 20:27 +0200
csiph-web