Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread TDateTime to Elevate SQL string
Fri, May 23 2008 3:17 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jeff
If you'd said C++ I've have kept well out of it, but as you say odd. Over to Tim.

Roy Lambert [Team Elevate]
Fri, May 23 2008 1:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jeff,

<< The values inspected in the debugger are in the comments. Odd. >>

What version of C++Builder are you using ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, May 24 2008 7:32 PMPermanent Link

Jeff Dunlop
C++ Pro 2007. I hope that gives enough information.
Sun, May 25 2008 11:13 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jeff,

<< C++ Pro 2007. I hope that gives enough information. >>

Okay, here's the issue.  You're calling the internal edbdatetime unit's
DatetoSQLStr function because you're not prefacing the call with the global
EDBEngine object.  The correct call is this:

TDateTime tdt = Sysutils::Now();
unsigned short y, m, d;
tdt.DecodeDate(&y, &m, &d);
String s = Edbcomps::Engine()->DateToSQLStr(tdt);
s = tdt.DateString();
s = tdt.FormatString("yyyy-mm-dd");

BTW, C++Builder 2007 is really nice now compared to the older C++Builder
versions 5 and 6.  Much cleaner and the pathing, etc. is much easier to do
deal with.  The interoperability with Delphi components is really clean now
also.

--
Tim Young
Elevate Software
www.elevatesoft.com

« Previous PagePage 2 of 2
Jump to Page:  1 2
Image