Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
“Aspire to Inspire before we Expire!”
maxgro
MVP
MVP

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

1.png