Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
Showing results for 
Search instead for 
Did you mean: 

Extracting Month from existing field

How to extract date, month and year from existing field?

For example, I have 1 field for date and time but the format is : DD/MM/YY HH.MM.SS

and the data is imported from a database.

How can I extract the date, month and year based on the existing field into 3 new fields?

1 Reply
Creator III
Creator III

Hi @duhita ,

You can use the timestamp#() function which interprets the incoming data in the way you outline in the second parameter.

As per your example:

date(timestamp#([Date field], 'DD/MM/YY')) as [Date]

month(timestamp#([Date field], 'DD/MM/YY')) as [Month]

Year(timestamp#([Date field], 'DD/MM/YY')) as [Year]

Documentation on reading in date times

I hope this makes sense.