Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can someone help me with this formatting please?

Morning all,

A date field has changed formats in between one of my IT loads, I need to change the date back to how it was within the script. Can someone help me with the following please?

InputDateOriginal  2015-01

InputDateChanged 05/01/2015

I'm getting myself in a bit of a tizz with the syntax and I can't seem to get it right!

Any help is appreciated.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

=num(month(InputDateChanged))

View solution in original post

8 Replies
Anonymous
Not applicable
Author

use date(InputDateChanged,'YYYY-MM')

balrajahlawat
Champion
Champion

you can again change it:

=date(YourFieldDate,'YYYY-MM')

Not applicable
Author

I've done that and it seems to work, I then need to split the month so I end up with a single number for the month.

e.g. 2015-01 would have a measure month of 1

That's the bit I'm struggling with, trying to get a single integer for the month.

miguelbraga
Specialist III
Specialist III

Hey Samuel,

Try this in the script:

Date(Date#([InputDateChanged], 'DD/MM/YYYY'), 'YYYY-MM') as InputDateOriginal

Regards,

MB

Anonymous
Not applicable
Author

=num(month(InputDateChanged))

View solution in original post

miguelbraga
Specialist III
Specialist III

punitpopli
Creator III
Creator III

Hi FLsamvile18‌,

try this :

mid(Date(Date#([InputDateChanged], 'DD/MM/YYYY'), 'YYYY-MM'),6,7)

or you can use subfield as well.

Thanks,

Punit

Not applicable
Author

Thanks everyone for your help and answers, don't know how I didn't get that...I was trying to be too complex!