SQL Time Syntax

Hey guys,

I am using SyBase SQL Anywhere v10. I have a column called timestart and issuing the command "select timestart from transaction" returns "1/31/2013 4:19:03 PM". I need it to return "2013-01-31 16:19:03". I know there is a convert function, but I can't seem to get it to work.

Any ideas?
Who is Participating?
PortletPaulConnect With a Mentor Commented:

convert(varchar, [your_date_field_here] ,120)

Sybase documentation for this is available at:

or my article on SQL Sever date styles (you will see the similarity immediately)
triphenAuthor Commented:
You rock! Thanks!
no problem, glad I could help. cheers, Paul
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.