[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

SQL Time Syntax

Posted on 2014-02-19
4
Medium Priority
?
347 Views
Last Modified: 2014-02-19
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?
0
Comment
Question by:triphen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 49

Accepted Solution

by:
PortletPaul earned 2000 total points
ID: 39872148
try:

convert(varchar, [your_date_field_here] ,120)

Sybase documentation for this is available at:
http://dcx.sybase.com/1001/en/dbrfen10/rf-convert.html

or my article on SQL Sever date styles (you will see the similarity immediately)
0
 

Author Closing Comment

by:triphen
ID: 39872159
You rock! Thanks!
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 39872562
no problem, glad I could help. cheers, Paul
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question