Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview Date Problem


Hello  -  Very new to this and really need help with dates.  I have a column which has dates formatted like this

06/2014

Dates are being loaded from SQL and EXCEL

The date format for SQL load is correct and left justified, however my dates from Excel are right justified (even though they look the same)

Please could someone assist ?

This is the code to load from Excel

    [Anticipated Launch date],
    
date(addmonths([Anticipated Launch date],IterNo()-1),'M/YYYY') as yearmonth,
    
[Expected 3 Year Sales Value],
    
[Expected 3 Year Sales Value]/36 AS PeriodValue
   
while IterNo() <= 36;

I am trying to format the YEARMONTH to left justified

Thank you in advance !!!

4 Replies
datanibbler
Champion
Champion

Hi Emma,

very probably (judging by the fact of the data being right-justified in Excel), that data is being transferred to QlikView as a numeric value. Check that. In that case, you'd have to adapt it using the DATE() function. Then you should have the same as from your SQL load.

HTh

Best regards,

DataNibbler

PrashantSangle

Hi,

Just Use

Date(Date#(dateFieldName,'MM/YYYY'),'MM/YYYY') as NewDate


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 🙂
MayilVahanan

HI

Try like this

Date(Date#([Anticipated Launch date],'MM/YYYY'),'MM/YYYY')  as YearMonth

or

u can use with Alt function

Alt(Date([Anticipated Launch date],'MM/YYYY'), Date(Date#([Anticipated Launch date],'MM/YYYY'),'MM/YYYY') ) as YearMonth

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Thank you max dreamer but I'm struggling to know where to put this in my code as I have a date function in there already ?