Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date format issue

Hello All

I have an issue with year format in date field. I have a date field in text document as 20160101 and so on.

After applying date function as date(createdate,'DD-MM-YYYY')  , it returns 01-01-57096.

I tried various functions like date#, floor, num but I am not able to get correct date.

Kindly help to get the result.

Thanks in advance.

Regards

Chintan Gala

1 Solution

Accepted Solutions
marcus_sommer

Try: date(date#(20160101, 'YYYYMMDD'), 'DD-MM-YYYY').

- Marcus

View solution in original post

7 Replies
Chanty4u
MVP
MVP

try this

Load *,

date(Date#(Datefield,'20160101'),'DD-MM-YYYY') AS newdate

;

marcus_sommer

Try: date(date#(20160101, 'YYYYMMDD'), 'DD-MM-YYYY').

- Marcus

Anonymous
Not applicable
Author

Thanks Marcus,  the second expression of yours works fine !

rubenmarin

Hi Chintan, if Marcus answer was what you were looking for please check his answer as the correct answer to check the thread as 'answered'.

Anonymous
Not applicable
Author

hi,

Your value is in field use like this,

=date(date#(Your Date filed,'YYYYMMDD'),'DD:MM:YYYY')

directly you want to apply on value try like this:

=Date(Date#(20160101,'yyyymmdd'),'dd:mm:yyyy')

Anonymous
Not applicable
Author

Yes Ruben , but when I select Actions it shows only 'Mark As Helpful'. There is no option to mark the answer as correct.  Could you please guide me to mark it as correct?

Thanks & Regards

Chintan Gala

rubenmarin

Hi Chintan, I'm not sure how it looks, I usually don't make questions.

You have to be logged in to see the option, then I suposse it will look like in this post: Qlik Community Tip: Marking Replies as Correct or Helpful

If doesn't shows, don't worry, you have a good alibi for this one , but at least mark also Marcus answer as helpful to help other users (actually is only checked as helpful Chanty's answer).