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

Seperate Months from Field

Hi All Fairly new here..

 

Just wanting to find out how would i go about achieving the following:

I have a field named TIme , withing that is the following 

01 Apr 2018 , 11:19:59 PM

01 Apr 2018 , 11:20:22 PM

01 Apr 2018 , 11:20:24PM

02 Apr 2018 , 11:19:59 PM

05 Apr 2018 , 11:19:59 PM

01 May2018 , 11:19:59 PM etc,etc

This holds 11 months Jan>Nov

I need to create seperate fields for each month to add them to straight table e.g:

Jan|  Feb|  Mar|  Apr| ....

I do not require the times or date just months in order to align my data to the specific month, how would i go about achieving this?

 

Thanks

Labels (1)
  • Other

3 Replies
Gysbert_Wassenaar

If your TIme field contains timestamps and not strings you can use the Month function directy: Month(TIme) as Month.

If that field contains string values you first need to convert the strings to timestamps: Month(timestamp#(TIme, 'DD MM YYYY, hh:mm:ss TT'))


talk is cheap, supply exceeds demand
CreoLTD112
Contributor
Contributor
Author

Thanks, would you be able to provide me with an example of this?

Gysbert_Wassenaar

Sure.

Load
*,
Month(timestamp#(MyField, 'DD MM YYYY , hh:mm:ss TT')) as Month
INLINE [
MyField
05 Apr 2018 , 11:19:59 PM
] (delimiter is '|');

talk is cheap, supply exceeds demand