Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

aaryanqvdevelop
Contributor

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.

Tags (1)
3 Replies

Re: Date Format + NUM

‌use floor() instead of num.

regards

Marco

HirisH_V7
Honored Contributor

Re: Date Format + NUM

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!”
MVP
MVP

Re: Date Format + NUM

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

1.png