Hi,
I have a string like '2008-01-01 11:09:11' How do I convert this to a datetime ?
Hi,
I have a string like '2008-01-01 11:09:11' How do I convert this to a datetime ?
If you're using it as a literal string in, say, a SELECT
statement or a stored procedure call, the conversion is automatic.
If you've got it in a variable, convert(datetime, @stringDateTime)
should work.
"Do you have that string outside of Sybase and you want to know how to insert it as a datetime?"
Yes, How would you or anyone solve this issue?