October 9, 2007 at 8:37 am
Guys,
I have data in the format '0x000000000002F4CE' for moddatetime, how do I convert to datetime?
I have tried
SELECT CAST ('0x000000000002F4CE' AS DATETIME)
SELECT CONVERT (DATETIME, '0x000000000002F4CE')
it doesnt seem to work
Any suggestions/inputs would help
Thanks
October 9, 2007 at 9:37 am
What is the data type of the column containing moddatetime?
October 9, 2007 at 9:55 am
This will do it in a scalar fashion. Something entirely different would need to be devised if you need to run it as a function.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
October 9, 2007 at 10:31 am
SELECT CAST (0x000000000002F4CE AS DATETIME)
remove the single quote so it is recognized as binary and not text
October 9, 2007 at 11:49 pm
Very detailed information about why it doesn't work is posted here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=90715
N 56°04'39.16"
E 12°55'05.25"
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply