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: 
gkcchowdary
Creator
Creator

how to change my date format?

Hi

I have date field with time stamp and I need to convent month_year format and write the rolling 12 months expression.

Creation_date

29/03/2018  22:10:07

29/03/2018  22:18:10

30/04/2018  10:12:15

30/04/2018  12:10:11  like that. I need convent like below

Mymonth:

MAR-2018

APR-2018

and using mymonth  as dimension and creating line chart with rolling 12 months expression.

How to do this. I am trying but it is not showing properly. Please help on this.

4 Replies
sibin_jacob
Creator III
Creator III

To get the monthyear, you can usethe MonthName function.

MonthName(Creation_date) as Month_Name

it will return the month and year

If you want to format the Creation_date column to Month value( 1,2,3 etc), use the below script

Date(Date#(Creation_Date,'DD/MM/YYYY  hh:mm:ss'),'MM') as Creation_Month_Value

OR

Date(Creation_Date,'MM') as Creation_Month_Value

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Chaitanya,

Please try below:

Date(Date#(Creation_date,'DD/MM/YYYY HH: MM:SS'),'MMM-YYYY') as  Mymonth,


Thanks,

Arvind Patil

agigliotti
Partner - Champion
Partner - Champion

I suggest you to create a master calendar, take a look at Creating A Master Calendar

arvind1494
Specialist
Specialist

Use fllowing expression in your load script :

UPPER(DATE(DATE(Creation_date,'DD/MM/YYYY'),'MMM-YYYY')) as Mymonth