Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
use floor() instead of num.
regards
Marco
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
HTH,
Hirish
you ca use floor and frac to get the date and time part