Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date issue

Hello all,

I need to change strings that have month names such as January, February to show month number (1,2, etc.) how can I do this?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

is it only a string or does it Show the dual part of a date function?

if it is only a string, I would use an inline mapping table

MapMonth:

mapping load * Inline [

January, 1

february, 2

..

]

Data:

load abc,

applymap('MapMonth, yourmonthstring) as Monthnr

..

the best way would be to use a mastercalendar

View solution in original post

5 Replies
Clever_Anjos
Employee
Employee

Use Month() function

kkkumar82
Specialist III
Specialist III

Hi Create a Inline load table as

Load * Inline [

Month, MonthNo

January, 1

February, 2

March,3

April, 4

May,5

June, 6

July,7

August,8

September,9

October,10

November,11

December,12

];

Try to associate this table with the original table which contains month column

kkkumar82
Specialist III
Specialist III

Or even , if the Month contains strings

Match(<FieldName, 'January' .......' December') as MonthNo

Write all MonthNames above

Anonymous
Not applicable
Author

is it only a string or does it Show the dual part of a date function?

if it is only a string, I would use an inline mapping table

MapMonth:

mapping load * Inline [

January, 1

february, 2

..

]

Data:

load abc,

applymap('MapMonth, yourmonthstring) as Monthnr

..

the best way would be to use a mastercalendar

vcanale
Partner - Creator II
Partner - Creator II

Hi,
try:   num(Month(FieldName))