Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date Format


Hi,

I have a date format as "Apr 2 2011 12:00 AM", how can I convert this into "YYYYMMDD"? The time is always12:00 AM.

Thanks.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if you have different format, use the alt function

date(

  alt(

  date#([Fiscal Week Ending Date], 'MMM DD YYYY hh:mmTT'),

  date#([Fiscal Week Ending Date], 'MMM  D YYYY hh:mmTT')

  )

, 'YYYYMMDD'  )

View solution in original post

14 Replies
its_anandrjs

Hi,

Convert your date field like

Date(DateField,'YYYYMMDD')

Thanks & Regards

Not applicable
Author

This will not work. It has something to do with timestamp.

its_anandrjs

Hi,

You mean to say when date change as YYYYMMDD the time should always 12:00 AM or also check your current date field it is date format or not.

Thanks & Regards

Not applicable
Author

I want to change my current date field in YYYYMMDD format. With date function it will not work.


its_anandrjs

Hi,

Ok write some thing like this

Date(DateField,'YYYYMMDD h:mm:ss TT')

Hope this helps

Thanks & Regards

Josh_Good
Employee
Employee

You can go into Setting -> Document Properties and select the "Number" tab.  From there you can set the field to be in the date format you desire and it will be change for the entire app.

Colin-Albert

Try

Date(date#(YourDateField, 'MMM D YYYY hh:mm') , 'YYYYMMDD hh:mm')

cgdonders
Partner - Creator
Partner - Creator

Hi,

If you only want to use the date you can delete the time (hh:mm:ss) by using the floor() function: DATE(FLOOR(datefield), 'YYYYMMDD').

Not applicable
Author

To everyone, I tried all the options and attaching a sample excel.