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

Converting Float into Date Expand / Collapse
Author
Message
Posted Thursday, July 16, 2009 4:53 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, April 8, 2014 10:53 PM
Points: 27, Visits: 202
Hi Guys,

I am trying to convert transaction Date to smalldatetime but no luck. Can any one please help me out with his.

I need a query to convert transaction date float to smalltimedate.

tblfuelCost

Fkey TotalAmount TransactionDate VehicleRego FuelPrice
1 2057 20090706 AB155 1.20

Thanks,

Rahul
Post #754551
Posted Thursday, July 16, 2009 5:00 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:12 PM
Points: 758, Visits: 1,031
Try:

convert(datetime, cast(TransactionDate as varchar(8)), 112)

Post #754554
Posted Thursday, July 16, 2009 5:24 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, April 8, 2014 10:53 PM
Points: 27, Visits: 202
Thanks Very Much :)
Post #754559
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse