Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Type

Hey Community,

I have Field date whit the following Build

Date
May 1, 2015
January1,2015
June 8, 2015
July 1, 2015
June 8, 2015
June 8, 2015
July 1, 2015
June 8, 2015
June 8, 2015
June 8, 2015

My question is how can i get the Year Month And Day at separate, I try to use Year month and day function but it dint work for me  e.c

Year:2015....

Month:June,July....

Thx

Hey guys, I said i try to use the function Year(), Day(),Month() But it didnt work. i add the app and screen shot hope you will help me Thank you guys

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

13 Replies
Anonymous
Not applicable
Author

Hi,

There were many ways to do this one of them of them is...

Go to Script:

LOAD Date,

     Year(Date) As Year,

     Month(Date) As Month,

     Day(Date) As Day;

Thanks

Vinay.

Chanty4u
MVP
MVP

yes u can extract from the Date field as below

year(Datefield) as year,

Month(Datefiled) as Month,

Day(Datefield) as day...lik so on  chk below link

Master Calemder

jonathandienst
Partner - Champion III
Partner - Champion III

Date(Date#(Date, 'MMMM dd, yyyy')) as Date,

Year(Date#(Date, 'MMMM dd, yyyy')) as Year,

Month(Date#(Date, 'MMMM dd, yyyy')) as Month,

...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunny_talwar

This:

Table:

LOAD *,

  Year(Date) as Year,

  Day(Date) as Day,

  Month(Date) as Month,

  MonthName(Date) as MonthYear;

LOAD Date#(Date, 'MMMM D, YYYY') as Date Inline [

Date

May 1, 2015

January 1, 2015

June 8, 2015

July 1, 2015

June 8, 2015

June 8, 2015

July 1, 2015

June 8, 2015

June 8, 2015

June 8, 2015

] (delimiter is |);

Anonymous
Not applicable
Author

Thank you  but as i say i try already this method and its not work,

i add the app and screen shot.

Anonymous
Not applicable
Author

Thx but as i say before this method does not work for me, i add the app and screen shot for you guys,

P.s i find jontydkpi  solution good enough.



Anonymous
Not applicable
Author

its work but still you can find at the app that two dates are in different type,

if you load the original data you will find that there is 2 dates that have only year and whit your solution it dont bring them back.

Chanty4u
MVP
MVP

chk attached

Anonymous
Not applicable
Author

Props to Chanty 4u: Beer!

1398983351.png
I owe you a beer!