Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date Format + NUM

Hi folks,

I Have a date Field in the following format YYYY-MM-DD hh:mm:ss now i want to to convert into Number  in script

i.e  Num(Date#(TransactionDate,'YYYY-MM-DD hh:mm:ss')) as TransactionDt

but the problem here is im getting output as 42400.2564123.. where i dont want decimal value.

expected output : 42400.

3 Replies
MarcoWedel

‌use floor() instead of num.

regards

Marco

HirisH_V7
Master
Master

Hi,

Try this,

ceil(Num(Date#(TransactionDate,'YYYY-MM-DD hh:mm:ss'))) as tdate,

Date#(Floor(TransactionDate),'YYYY-MM-DD hh:mm:ss') as tdate2

The Date Function

HTH,

Hirish

HirisH
maxgro
MVP
MVP

you ca use floor and frac to get the date and time part

1.png