Board index » delphi » function StrToDateTime and a MM/DD/CCYY HH:MM:SS Date time

function StrToDateTime and a MM/DD/CCYY HH:MM:SS Date time

Hi

I was wondering if there was a different StrToDateTime function that would
take into account of a four digit year ie CCYY. The current StrToDateTime
funciton seems to call for a MM/DD/YY HH:MM:SS String format.

Thanks in advance
Suj

--
Sujith S. Subasinghe
s...@intergate.bc.ca
Office Integration
202-4746 Hastings Street
Burnaby BC, Canada V5C 2K7
Phone: 1-604-298-9871
Fax: 1-604-298-2969

 

Re:function StrToDateTime and a MM/DD/CCYY HH:MM:SS Date time


Look at the Date and Time Routines page in the Delphi (1.0) help

Alain Quesnel

Sujith S. Subasinghe <s...@intergate.bc.ca> wrote in article
<01bc2904$30ca3ee0$3200a...@suj.sms.net>...

Quote
> Hi

> I was wondering if there was a different StrToDateTime function that
would
> take into account of a four digit year ie CCYY. The current StrToDateTime
> funciton seems to call for a MM/DD/YY HH:MM:SS String format.

> Thanks in advance
> Suj

> --
> Sujith S. Subasinghe
> s...@intergate.bc.ca
> Office Integration
> 202-4746 Hastings Street
> Burnaby BC, Canada V5C 2K7
> Phone: 1-604-298-9871
> Fax: 1-604-298-2969

Re:function StrToDateTime and a MM/DD/CCYY HH:MM:SS Date time


"Sujith S. Subasinghe" <s...@intergate.bc.ca> wrote:

Quote
>Hi

>I was wondering if there was a different StrToDateTime function that would
>take into account of a four digit year ie CCYY. The current StrToDateTime
>funciton seems to call for a MM/DD/YY HH:MM:SS String format.

>Thanks in advance
>Suj

var t:tdatetime;
begin
shortdateformat:='mm/dd/yyyy';
t:=strtodatetime('01/29/2001 11:58:10');
showmessage(datetimetostr(t)); {Displays as: 01/29/2001 11:58:10 AM}
end;

--
Robert Kuesterman                                     Salt Lake City
robe...@xmission.com                             oc...@ix.netcom.com

Other Threads