How can i change varchar to datetime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datetime column in db that stores datetime in varchar format suct
that "20060616120621". I want to get this date in a datetime format to make
comparisions according to that. How can i do that with an SQL Query or c#
code?

Thanks
 
You should call sql function to_date( string1, [ format_mask ], [
nls_language ] ) to convert a string to date format.
 
Back
Top