I have the number 20080331.
I need to cast/convert this into a datetime so I can do a date comparison within the database. How will i go about converting this number. Using CONVERT(DATETIME, Value) does not seem to work.
SELECT CONVERT(DATETIME, CAST(20110331 AS VARCHAR(8)), 112)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With