Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to convert date format 5/30/2014 8:45:00 AM
to date format 3/25/2014 3:25:00 AM.
Thanks
Hi Anuradha,
Do you need to convert the date format or need to change the date to some other value????
if you want to change the format use DATE(feildname,'DD/MM/YYYY')
or timestamp(feildname, 'MMM DD, YYYY hh:mm')
Regards,
@vi
Not understood clearly the date format of 5/30/2014 8:45:00 AM is MM/DD/YYYY h:mm:ss TT and what is mean for 3/25/2014 3:25:00 AM let me know.
I think u are looking for date format change some thing like:
if u want to change the date format MM/DD/YYYY
u can do in the initial default script: SET DateFormat='MM/DD/YYYY';
you could use timestamp and timestamp# functions to format this. its more of a timestamp than a date.
Hi Anuradha,
Do you need to convert the date format or need to change the date to some other value????
if you want to change the format use DATE(feildname,'DD/MM/YYYY')
or timestamp(feildname, 'MMM DD, YYYY hh:mm')
Regards,
@vi
If you want to change the date format then use
From 'MM/DD/YYYY h:mm:ss TT'
To Timestamp( YourDateField ,'DD/MM/YYYY h:mm:ss TT')
Or
From 'MM/DD/YYYY h:mm:ss TT'
To Date( YourDateField ,'DD/MM/YYYY')
Hii Anuradha ,
Use Floor() function for your date field. This will remove the digits after the decimal. that is you will get the date with timestamp removed.
Syntax:
Date(Floor(Date_Field))