var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL Query Syntax to format date fields
Hi! Good Day!
What is the syntax to format the datefield? The value of my datefield is like this:
10/13/2005 5:15:02 PM
What is the select query to filter the date only. My desired result should be:
ok try dis
select field1,convert(varchar,fielddate,101) from tablename
I was now able to get the date only.
How about if i wanted to get the time only.
For example for this value "10/13/2005 5:15:02 PM".
My desired result would be: "5:15:02 PM".
Thanks for taking the time to anwer my questions.
Check out Convert in BOL - it has a table of all the possible datetime conversions you could think of
ur codings are working excelent.
SELECT CONVERT(VARCHAR,datetimefield,108) FROM table
Thank you so much guys.
My query is ok now.