Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Format number in load script

Hi everyone,

Need a little help in getting my number format right in my load script.  Here is what I have.......but not working.

Thanks in advance.

Num((if(Len(trim(Acq_Hire_Date) > 0), Num(LastWorked_Date) - Num(Acq_Hire_Date), Num(LastWorked_Date) - Num(HireDate)) / 365,'00')) as [LOS]

1 Solution

Accepted Solutions
tmumaw
Specialist II
Specialist II
Author

Got it to work.  Thanks everyone for your help.

Num((if(Len(trim(Acq_Hire_Date) > 0), Num(LastWorked_Date) - Num(Acq_Hire_Date), Num(LastWorked_Date) - Num(HireDate)) / 365),'00') as [LOS] 

View solution in original post

9 Replies
eespiritu
Creator
Creator

Hi Thom,

Try this:

Num((if(Len(trim(Acq_Hire_Date) > 0), Num(LastWorked_Date) - Num(Acq_Hire_Date),Num(LastWorked_Date) - Num(HireDate)) / 365,'#,##0.00')) as [LOS]


Regards,


Enrique.

sunny_talwar

May be this

Num(

(If(Len(trim(Acq_Hire_Date) > 0,

     LastWorked_Date - Acq_Hire_Date,

     LastWorked_Date - HireDate)/365),

'00') as [LOS]

Anil_Babu_Samineni

May be try this?

If(Len(Trim(Acq_Hire_Date))>0, Num(LastWorked_Date - Acq_Hire_Date), Num((LastWorked_Date - HireDate)/365)) as LOS


Split to diff expressions and then try

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tmumaw
Specialist II
Specialist II
Author

nope

tmumaw
Specialist II
Specialist II
Author

nope

sunny_talwar

Can you share a screenshot?

Anonymous
Not applicable

Num((if(isnull(Acq_Hire_Date),Num(LastWorked_Date) - Num(HireDate), Num(LastWorked_Date) - Num(Acq_Hire_Date)) / 365,'00')) as [LOS]

tmumaw
Specialist II
Specialist II
Author

Got it to work.  Thanks everyone for your help.

Num((if(Len(trim(Acq_Hire_Date) > 0), Num(LastWorked_Date) - Num(Acq_Hire_Date), Num(LastWorked_Date) - Num(HireDate)) / 365),'00') as [LOS] 

sunny_talwar

Great, if you got what you wanted, I would suggest closing this thread by marking your own response as the correct answer.

Best,

Sunny