October 19, 2009 at 8:40 am
Then I stand corrected.
But that doesn't seem to be obvious though.. The dateadd function in particular, what variation is there to adding (or deleting) time that would be configured by the server? Some of the other date functions maybe, but not this one.. Am I missing something, or did they just mark it non-deterministic.
CEWII
October 19, 2009 at 8:49 am
DateAdd month, if you're using the Arabic calendar or Chinese calendar, functions quite differently than if you're using the Gregorian calendar. All by itself, that makes the function non-deterministic.
Edit: Hebrew calendar would be different too.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
October 19, 2009 at 9:03 am
Sorry, I was completely forgetting about the other calendaring methods. Ah, American thinking.. Gotta love it..
CEWII
November 27, 2012 at 4:49 pm
Just a note when working with datetime stored as number/int...
check if it is stored in seconds or milliseconds .. i.e if it is 10 characters or 13 characters...
code to convert if seconds
select dateadd(hour,-1,(dateadd(second,([your columnname]),'1/1/1970')))
from [your table name]
if milliseconds
select dateadd(hour,-1,(dateadd(second,([your columnname]/1000),'1/1/1970')))
from [your table name]
hope this helps.
Cheers 😀
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply