I have a string eg. "2008-01-01 11:09:11".
How do I convert this to a datetime ?
I have a string eg. "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.
The timestamp datatype is defined as varbinary(8) null
and does it have any relation at all to time or date.
You cannot convert timestamp to datetime in sybase.