Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 14 total |
TDateTime to Elevate SQL string |
Sat, Dec 29 2007 4:17 PM | Permanent 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 PM | Permanent 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 PM | Permanent 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 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. 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 PM | Permanent 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 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Mikko,
<< I'am trying to open links but get Error Code 404 >> The links have changed: http://www.elevatesoft.com/scripts/manual.dll?action=mancompmethod&id=edb1&product=d&version=7&comp=TEDBEngine&method=DateToSQLStr http://www.elevatesoft.com/scripts/manual.dll?action=mancompmethod&id=edb1&product=d&version=7&comp=TEDBEngine&method=DateTimeToSQLStr http://www.elevatesoft.com/scripts/manual.dll?action=mancompmethod&id=edb1&product=d&version=7&comp=TEDBEngine&method=TimeToSQLStr -- Tim Young Elevate Software www.elevatesoft.com |
Thu, May 22 2008 1:27 AM | Permanent Link |
Jeff Dunlop | Any ideas why DateToSQLStr(Now()) returns '0109-05-24'?
|
Thu, May 22 2008 7:04 AM | Permanent Link |
Fernando Dias 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 AM | Permanent Link |
Roy Lambert NLH Associates 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 PM | Permanent 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 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |