>>>>The datetime is saved as yyyy-mm-dd hh:mm:sec (ODBC canonical form) format .<<
>>Datetime values are not stored in any regional format whatsoever (they are actually stored as two >>integers)
Thanks for your comment, I was unaware of this...
>>>>Is there anyway i can get the valu in ODBC canonical form?<<
>>You willl have to convert (using the T-SQL CONVERT() function) to a character data as in:
>>CONVERT(varchar(20), YourDate, 120)
Actually my issue is that if i run the query "select * from table_name" the o/p is in the format yyyy-mm-dd hh:mm:sec but when i run the same query from cpp application using ADO the following line of code
adboCmd->Parameters->Item[CO
gives me the value in the format mm/dd/yyyy hh:mm:sec
Any idea why this is the behavior ?
Is there anything i could modify in the ADO API to get the ODBC cannonical format of timestamp?
Main Topics
Browse All Topics





by: acperkinsPosted on 2009-04-24 at 15:33:07ID: 24229860
>>The datetime is saved as yyyy-mm-dd hh:mm:sec (ODBC canonical form) format .<<
Datetime values are not stored in any regional format whatsoever (they are actually stored as two integers)
>>Is there anyway i can get the valu in ODBC canonical form?<<
You willl have to convert (using the T-SQL CONVERT() function) to a character data as in:
CONVERT(varchar(20), YourDate, 120)