Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 14 total
Thread TDateTime to Elevate SQL string
Sat, Dec 29 2007 4:17 PMPermanent Link

"Scott Woods"
I noticed that Elevate SQL needs a string in the following format:

'yyyy-mm-dd' such as 2007-12-29 .  Is there a function in elevate that will
convert a TDateTime into this format?
Sat, Dec 29 2007 4:40 PMPermanent Link

"Mike Shkolnik"
Why not use the standard FormatDateTime() function?

--
With best regards, Mike Shkolnik
Scalabium Software
http://www.scalabium.com
mshkolnik@scalabium.com

"Scott Woods" <swoods80@gmail.com> wrote in message
news:95D7C2CA-26D5-475A-AFE4-5732F8D2D110@news.elevatesoft.com...
> I noticed that Elevate SQL needs a string in the following format:
>
> 'yyyy-mm-dd' such as 2007-12-29 .  Is there a function in elevate that
will
> convert a TDateTime into this format?
>
>

Sat, Dec 29 2007 6:25 PMPermanent Link

"Scott Woods"
I used DecodeDate but just wanted to see if a method was in Elevate source
to do this.

"Mike Shkolnik" <mshkolnik@scalabium.com> wrote in message
news:CC81AD30-007D-47BB-8031-5C7333F0A78B@news.elevatesoft.com...
> Why not use the standard FormatDateTime() function?
>
> --
> With best regards, Mike Shkolnik
> Scalabium Software
> http://www.scalabium.com
> mshkolnik@scalabium.com
>
> "Scott Woods" <swoods80@gmail.com> wrote in message
> news:95D7C2CA-26D5-475A-AFE4-5732F8D2D110@news.elevatesoft.com...
>> I noticed that Elevate SQL needs a string in the following format:
>>
>> 'yyyy-mm-dd' such as 2007-12-29 .  Is there a function in elevate that
> will
>> convert a TDateTime into this format?
>>
>>
>
>
Mon, Dec 31 2007 7:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Scott,

<< I noticed that Elevate SQL needs a string in the following format:

'yyyy-mm-dd' such as 2007-12-29 .  Is there a function in elevate that will
convert a TDateTime into this format?  >>

Yep:

http://www.elevatesoft.com/edb1d7_tedbengine_datetosqlstr.htm
http://www.elevatesoft.com/edb1d7_tedbengine_timetosqlstr.htm
http://www.elevatesoft.com/edb1d7_tedbengine_datetimetosqlstr.htm

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Feb 8 2008 3:31 PMPermanent Link

"Erva"
I'am trying to open links but get Error Code 404

-mikko


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> kirjoitti
viestissä:061FB298-9246-46D5-A526-687B538024FB@news.elevatesoft.com...
> Scott,
>
> << I noticed that Elevate SQL needs a string in the following format:
>
> 'yyyy-mm-dd' such as 2007-12-29 .  Is there a function in elevate that
> will convert a TDateTime into this format?  >>
>
> Yep:
>
> http://www.elevatesoft.com/edb1d7_tedbengine_datetosqlstr.htm
> http://www.elevatesoft.com/edb1d7_tedbengine_timetosqlstr.htm
> http://www.elevatesoft.com/edb1d7_tedbengine_datetimetosqlstr.htm
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Mon, Feb 11 2008 3:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Thu, May 22 2008 1:27 AMPermanent Link

Jeff Dunlop
Any ideas why DateToSQLStr(Now()) returns '0109-05-24'?
Thu, May 22 2008 7:04 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Jeff,

> Any ideas why DateToSQLStr(Now()) returns '0109-05-24'?

What is now() returning ?

--
Fernando Dias
[Team Elevate]
Thu, May 22 2008 7:33 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jeff


I've just tried it here and its fine. So in addition to Fernando's question what is the short date format?

Also try prefacing Now with Sysutils. just in case a Now function is declared in another unit and is overriding the one in Sysutils.

Roy Lambert [Team Elevate]
Thu, May 22 2008 6:37 PMPermanent Link

Jeff Dunlop
TDateTime tdt = Sysutils::Now();
unsigned short y, m, d;
tdt.DecodeDate(&y, &m, &d); // y: 2008 m: 5 d: 23
String s = DateToSQLStr(tdt); // "0109-05-25"
s = tdt.DateString(); // "23/05/2008"
s = tdt.FormatString("yyyy-mm-dd"); // "2008-05-23"

The values inspected in the debugger are in the comments. Odd.
Page 1 of 2Next Page »
Jump to Page:  1 2
Image