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

Date format issue in output

Hi, I am new to qlikview, can someone please help me to correct date format in my report, my input table has date as "26-07-2001".

I have extracted minimum date using Date(min(datefirstpurchase),'dd-mm-yyyy') as MinDate, but in output i am getting minimum date as '01-00-2001', i am getting month value as '00'. do i need to change my expression, please suggest...

1 Solution

Accepted Solutions
ThornOfCrowns
Specialist II
Specialist II

There is a difference in mm and MM as mm = minutes and MM = month, so dd-mm-yyyy will not bring back the same result as dd-MM-yyyy.

View solution in original post

9 Replies
PrashantSangle

Hi,

If it is date format then there is no need to use date() function

You can directly use min(datefirstpurchase)

If not then you have to first give him formatting then use in min()

Like,

min(Date(Date#(datefirstpurchase),'DD-MM-YYYY'))

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

Hi,

write like

=Date(Date#(min(datefirstpurchase),'DD-MM-YYYY'),'DD-MM-YYYY')

Thanks & Regards

ThornOfCrowns
Specialist II
Specialist II

There is a difference in mm and MM as mm = minutes and MM = month, so dd-mm-yyyy will not bring back the same result as dd-MM-yyyy.

sunilkumarqv
Specialist II
Specialist II

Try like these


=min(Date(Date#(datefirstpurchase),'DD-MM-YYYY')) as MinDate

or you can simply use =min(Date(datefirstpurchase,'DD/MM/YYYY')) as Min Date


and below Gives you wrong result


=Date(Date#(min(Date),'DD-MM-YYYY'),'DD-MM-YYYY')


Anonymous
Not applicable
Author

you need to write date format in upper case like 'DD-MM-YYYY'.  Correctly said by James.

Not applicable
Author

Thank you so much James, i just changed mm to MM and got out put as '01-07-2001', Thanks a lot ..........

ThornOfCrowns
Specialist II
Specialist II

No probs!

Not applicable
Author

Thank you so much, i tried removing date but dint get answer in date format. the below expression which you suggested works min(Date(Date#(datefirstpurchase),'DD-MM-YYYY'))...

Not applicable
Author

Thank you so much sunil both the expressions suggested by you works ....