Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Number Format for a calculated field in script

I have a field that I am calculating in my script and I can't seem to get the format correct.  Here is the code in my script to create the field:

 

Num(MonthsEnd(1,Today(),-1)-[Posting Date],'#,##0') as DaysAged

 

I want this to be a number without decimals.  When I look at the values in a list box, it looks fine, but when I export the data to Excel, I still see the decimals.  How can I make it a whole number when exporting to Excel?

Labels (3)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

try Num(round(MonthsEnd(1,Today(),-1)-OrderDate),'#,##0')

View solution in original post

1 Reply
dplr-rn
Partner - Master III
Partner - Master III

try Num(round(MonthsEnd(1,Today(),-1)-OrderDate),'#,##0')