Hi,
I need to query a date field in my table. I wanted to convert it to mm/dd/yyyy and thus I used the CONVERT(datetime,mydatefield,101) but it is giving the same default result in the SQL Query analyzer.
Also in some cases I need to extract the year from the date field or the month etc... What can I use to format date fields in SQL.
In oracle it was quite simple but can`t figure it out in SQL.
Thanks for your help.
Mario
I need to query a date field in my table. I wanted to convert it to mm/dd/yyyy and thus I used the CONVERT(datetime,mydatefield,101) but it is giving the same default result in the SQL Query analyzer.
Also in some cases I need to extract the year from the date field or the month etc... What can I use to format date fields in SQL.
In oracle it was quite simple but can`t figure it out in SQL.
Thanks for your help.
Mario