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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lbunnell
Creator
Creator

Date Index

I'm trying to import some dates that are in the following 3-4 digit format: 115, 215, 315,... etc

Fore example:

115 (Jan 2015)

1115 (November 2015)

214 (February 2014)

913 (September 2013)

Anyone know a way to automatically format these dates so that they can be recognized by Qlikview as dates?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use below in your script..

Date(If(Len(Date)=3, Date#(Date,'MYY'),Date#(Date,'MMYY')),'MMM YYYY') as MonthYear

View solution in original post

2 Replies
Anonymous
Not applicable

if len(yourfield)=3,

makedate(2000+right(yourfield,2), left(yourfield,1),

  makedate(2000+right(yourfield,2), left(yourfield,2),

MK_QSL
MVP
MVP

Use below in your script..

Date(If(Len(Date)=3, Date#(Date,'MYY'),Date#(Date,'MMYY')),'MMM YYYY') as MonthYear