-
convert var char field to date field
Hi,
I need to convert a var char field to date field (DD/MM/YYYY)
Current convertion format:
CAST(Report_Date as DATETIME)
How can i convert to Date field with date format of DD/MM/YYYY?
Thanks.
Onn Onn
-
Try this:
select convert(datetime, report_date, 103)
-
No, you have to convert to datetime first and then convert to varchar with a particular style:
select CONVERT(varchar, convert(datetime, report_date), 103)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|