[ erekoz @ 21.10.2003. 09:21 ] @

Pozdrav svima,

Postoji li funkcija za vracanje sistemskog vremena u raznim formatima?

unapred zahvalan, erekoz
[ pedja_vujic @ 21.10.2003. 11:44 ] @
FormatDateTime(const Format: string; DateTime: TDateTime):

napr.

showmessage(FormatDateTime('dd.mm.yyyy',Date));
[ byTer @ 21.10.2003. 12:54 ] @
A imase i neka funkcija SQLStamp proveri u helpu!
[ morlic @ 21.10.2003. 21:52 ] @
Citat:
pedja_vujic:
FormatDateTime(const Format: string; DateTime: TDateTime):

napr.

showmessage(FormatDateTime('dd.mm.yyyy',Date));



treba 'dd.MM.yyyy' umesto 'dd.mm.yyyy' jer MM predstavlja mesec, a mm minute

Primer:

'dd.MM.yyyy HH:mm' vraca npr. 26.01.2003 16:45
[ pedja_vujic @ 21.10.2003. 22:03 ] @
ne bih se bas slozio sa ovim posto za minute se koristi nn
sve fino pise u delphi helpu:

mm Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

nn Displays the minute with a leading zero (00-59).

[ morlic @ 22.10.2003. 20:55 ] @
Pedja, u pravu si. Ovo sto sam ja napisao vazi samo za neke Windows stvarcice (npr. DateTimePicker).