Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Convert Date formats

I want to convert  date format 5/30/2014  8:45:00 AM

to date format  3/25/2014  3:25:00 AM.

Thanks

1 Solution

Accepted Solutions
avinashelite

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

View solution in original post

6 Replies
its_anandrjs

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.

vardhancse
Specialist III
Specialist III

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';

Anonymous
Not applicable

you could use timestamp and timestamp# functions to format this. its more of a timestamp than a date.

avinashelite

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

its_anandrjs

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')

rohan_mulay
Partner - Creator
Partner - Creator

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))