Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

timestamp vs timestamp Expand / Collapse
Author
Message
Posted Tuesday, September 30, 2008 12:23 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:26 AM
Points: 2,716, Visits: 2,484
Comments posted to this topic are about the item timestamp vs timestamp
Post #578092
Posted Tuesday, September 30, 2008 3:11 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 3:10 AM
Points: 1,274, Visits: 1,987
I notice that the ODBC datetime format is very strict!

select { ts '2008-09-21 12:34:56' }

is OK.
select { ts '2008-9-21 12:34:56' }

produces a conversion error!


Derek
Post #578144
Posted Tuesday, September 30, 2008 4:04 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 8:26 AM
Points: 2,716, Visits: 2,484
I guess thats a good thing in a cross-technology standard!


Kev
Post #578170
Posted Tuesday, September 30, 2008 5:46 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, December 10, 2014 12:22 PM
Points: 2,671, Visits: 787
I wasn't aware of the ODBC datatype. Good question. Answer was obvious after the following worked:

DECLARE @ts timestamp, @dt as datetime

set @dt = {ts '2008-09-21 15:53:00'}

But, does the timestamp update from the code above? If not, how would this work?


Jamie
Post #578206
Posted Tuesday, September 30, 2008 9:27 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 4:08 PM
Points: 2,396, Visits: 18,069
Nicely written! Excellent job coming up with some answers that sound good if you haven't used a timestamp before, yet leaving the correct answer clearly on it's own.

Post #578397
Posted Wednesday, October 1, 2008 1:07 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, December 15, 2014 4:15 AM
Points: 5,471, Visits: 1,402
Nice question.


Post #578882
Posted Thursday, December 13, 2012 7:24 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Sunday, December 14, 2014 11:09 PM
Points: 1,962, Visits: 2,406
really nice question


_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1396183
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse