Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Stuck with Date Formats any help on this

Can any help on Date Function i am having date column with below format

LastReload
201501

as YYYYMM while using QlikView Chart objects to get Year,Month,Quarter how to achieve from this?

while using in Monthname(LastReload)=>Giving output as Sep 2451 actually expected is Jan 2015?

How to get MonthName(Jan,Feb,Mar....),month(1,2,3,4,5,6....),Quarter(2014Q4,2015Q1,2015Q2,2015Q3,...) all are expected from single Column LastReload

10 Replies
PrashantSangle


Hi,

USe

MonthName(Date#(LastReload,'YYYYMM')) as MonthName

Month(Date#(LastReload,'YYYYMM')) as Month

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

can you please share your data file or sum examples so that we can try to resolve this issue.

Regards

Priyanka

Anonymous
Not applicable
Author

Max your solution helped can you help on Quarter==>Quarter(2015Q1,...)

how to write the logic for Quarter

Ralf-Narfeldt
Employee
Employee

Year(Date#(LastReload,'YYYYMM')) & 'Q' & Ceil(Month(Date#(LastReload,'YYYYMM'))/3) AS QuarterYear

Not applicable
Author

Hi,

You can try this

in script editor

Let LastReload = now();

Let Quarter=if(len(LastReload)>0, 'Q' & ceil(month(LastReload)/3));

In textbox or where ever you want to display lastReload

=Year(LastReload) & Quarter

Regards,

Priyanka

Colin-Albert

Just use the ReloadTime function and format the value returned as a date or date time using the format expression you require in a text object.

=date(reloadtime(), 'DD MMM YYYY  hh:mm')

=date(reloadtime(), 'DD/MM/YY')

='Last Reloaded ' & date(reloadtime(), 'DD/MM/YY')

Anonymous
Not applicable
Author

year(Date#(LastReload,'YYYY')) as LatestYear, is giving 201501

but expected is 2015

Thanks for your solutions really helped a lot.

Not applicable
Author

Hi,

You can also try

=Year(ReloadTime()) & if(len(ReloadTime())>0, 'Q' & ceil(month(ReloadTime())/3))

Regards

Priyanka

Colin-Albert

Date# is a command for converting text to a date - it converts the data that is input.

To format the output data , use the date() function.

Use either          date(LastReload,'YYYY')

or                      year(LastReload)

Assuming that the LastReload field is correctly loaded as a date field!

Otherwise just use the reloadtime() function.               e.g.      year(reloadtime())