Board index » delphi » TDateTimePicker - format "DD/MM/YYYY"?

TDateTimePicker - format "DD/MM/YYYY"?

Is it possible to view date in the TDateTimePicker component in format
"DD/MM/YYYY"?
--
Any help will be appreciate.
Rita Barda.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

 

Re:TDateTimePicker - format "DD/MM/YYYY"?


Rita,
  Fortunately this one is easy;

uses
   SysUtils
........

ShortDateFormat := 'dd/mm/yyyy';

see help for "Currency and date/time formatting variables"

 If you are using Delphi C/S 3 and work out how to get the Picker to handle
dates 2000-2009 let me know.
Apparently the bugs are fixed in v4 but I'm stuck.

Cheers,
Craig.

Quote
Rita Barda wrote in message <7f5ggk$44...@nnrp1.dejanews.com>...
>Is it possible to view date in the TDateTimePicker component in format
>"DD/MM/YYYY"?
>--
>Any help will be appreciate.
>Rita Barda.

>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Re:TDateTimePicker - format "DD/MM/YYYY"?


In article <7f69jt$3c...@news.iinet.net.au>,
  "Craig Kinsman" <cr...@SPAMOFFsystemcorp.iinet.net.au> wrote:

Quote
> Rita,
>   Fortunately this one is easy;

> uses
>    SysUtils
> ........

> ShortDateFormat := 'dd/mm/yyyy';

> see help for "Currency and date/time formatting variables"

Craig,

I'm using this definition in the FormCreate procedure. It's good for the date
fields, but TDateTimePicker still shows "yy" instead "yyyy": in the drop-down
calendar ("Today: 18/04/99") and when DateFormat is dfShort.

Rita.

Quote

>  If you are using Delphi C/S 3 and work out how to get the Picker to handle
> dates 2000-2009 let me know.
> Apparently the bugs are fixed in v4 but I'm stuck.

> Cheers,
> Craig.

> Rita Barda wrote in message <7f5ggk$44...@nnrp1.dejanews.com>...
> >Is it possible to view date in the TDateTimePicker component in format
> >"DD/MM/YYYY"?
> >--
> >Any help will be appreciate.
> >Rita Barda.

> >-----------== Posted via Deja News, The Discussion Network ==----------
> >http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

--
Any help will be appreciate.
Rita Barda.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:TDateTimePicker - format "DD/MM/YYYY"?


On Sun, 18 Apr 1999 09:42:00 GMT, Rita Barda eloquently stated...

Quote
> In article <7f69jt$3c...@news.iinet.net.au>,
>   "Craig Kinsman" <cr...@SPAMOFFsystemcorp.iinet.net.au> wrote:
> > Rita,
> >   Fortunately this one is easy;

> > uses
> >    SysUtils
> > ........

> > ShortDateFormat := 'dd/mm/yyyy';

> > see help for "Currency and date/time formatting variables"

> Craig,

> I'm using this definition in the FormCreate procedure. It's good for the date
> fields, but TDateTimePicker still shows "yy" instead "yyyy": in the drop-down
> calendar ("Today: 18/04/99") and when DateFormat is dfShort.

Have a play with a line like:

SendMessage(DateTimePicker1.Handle, DTM_SETFORMAT, 0, LongInt(PChar('ddd,
MMM dd yy   hh:mm:ss tt')));

Probably something like....

SendMessage(DateTimePicker1.Handle, DTM_SETFORMAT, 0,
LongInt(PChar('dd/MM/yyyy')));

....should do it.

--
Andy Jeffries
Kwik-Rite Development

--See http://www.kwikrite.clara.net/ for Kwik-Crypt BETA - Self-restoring
  archive maker for Windows 95/98/NT using Blowfish   (FREEWARE)

Other Threads