Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How do I convert a SQL field in text format into a DATE formatted field ?

$
0
0

I have a field that holds a time in it - 211836 or 25917 meaning 21:18:36 and 02:59:17. I need to be able to copy this into a field that is of the DATE type.

I have tried "set WeighTime = CONVERT(time,WeighTimeNo, 103)", but get an error : Conversion failed when converting date and/or time from character string.

Help !


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>