August 9, 2007 at 10:46 am
I have a database from a vendor that has the date/time stored as a float.
Example: 20070809100330.0
I think it is YYYYMMDDHHMMSS
I would like to convert that into a date time, but I am totally stumped. I tried casting/converting it to a varchar and then doing string functions on it, but I can't get the desired results.
August 9, 2007 at 11:32 am
declare @f float set @f =20070809100330.0
select convert(datetime,stuff(stuff(stuff(convert(bigint,@f),9,0,' '),12,0,':'),15,0,':'))
August 9, 2007 at 11:42 am
Michael, I would buy you a beer if I could for that syntax. I was nowhere near that. Worked like a charm, Thanks!
August 9, 2007 at 11:48 am
There's always paypal .
August 9, 2007 at 2:03 pm
Heh... forget PayPal... UPS will ship a keg
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2007 at 2:27 pm
Paypal does that too .
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply