Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading last digit in a string

Hi how would I load '2015-08' so that only '8' is displayed ?

Thanks

14 Replies
sunny_talwar

Try this:

Right(FieldName, 1) as Digit

avinashelite

right(our_field_name,1)

Not applicable
Author

Sorry should have been far clearer as it's not always the last digit.

Basically I have the following :

2014-09

2014-10

2014-11

What I want is to always be left with the month so my results would show as such :

9

10

11

manojkulkarni
Partner
Partner

you can use

right(FieldName,2) or subfield(FieldName,'-',2)

maxgro
MVP
MVP

num(month(date#(yourfield, 'YYYY-MM')))

sunny_talwar

Try this:

Num(Month(Date#(DateFieldName, 'YYYY-MM'))) as Month_Num

Peter_Cammaert

or if you just want the month number and not the underlying date value:

num(right(fieldname,2),'#0')

[Edit] took out the whitespace to make it even smaller. That's about the only advantage: fewer characters to type

amayuresh
Creator III
Creator III

Try this

=MID(FieldName,index(FieldName,'-')+1) as Month_Num

jagan
MVP
MVP

Hi,

Try

Num(Right(FieldName, 2))

Hope this helps you.

Regards,

jagan.