Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
wonkymeister
Creator III
Creator III

Odd Num of Date

Guys,

shouldnt a num of date always be a flat int? ie 44773 and not 44773.999999988?

LET vPACEND = num(if(num(day(Today())) <25 , Date(MonthEnd(AddMonths(Today(),-1))) , Date(MonthEnd(Today()))));

the value of vPACEND in a text box ie DATE(vPACEND ) is 44773.999999988

cheers

 

Labels (1)
1 Solution

Accepted Solutions
PrashantSangle

hi

it is because you are using monthend()

AFAIK, it will gave date on timestamp format. and because of that you are getting decimal value.

by default num() only convert the value into numeric format as it is, if want to rounded value then use num(field,'#0') or use floor() to round it.

 

Regards,

Prashant Sangle

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 🙂

View solution in original post

3 Replies
PrashantSangle

hi

it is because you are using monthend()

AFAIK, it will gave date on timestamp format. and because of that you are getting decimal value.

by default num() only convert the value into numeric format as it is, if want to rounded value then use num(field,'#0') or use floor() to round it.

 

Regards,

Prashant Sangle

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 🙂
wonkymeister
Creator III
Creator III
Author

Brilliant, thanks for help