Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

ajsjoshua
Contributor III

Floor Condition

Dear all,

Floor function is not working for date fetched from csv files. I using floor function to exclude HH:MMSmiley FrustratedS.

Date(Floor(receipt_date),'DD/MM/YYYY') as CollectionDate,

Thanks & Regards,

Joshua.

Tags (1)
5 Replies
sureshqv
Esteemed Contributor III

Re: Floor Condition

try this

=DATE(FLOOR(Timestamp#(YourTimeStampField)),'DD/MM/YYYY')

sureshqv
Esteemed Contributor III

Re: Floor Condition

If the loaded value does not match your timestamp format then the value will be loaded as text. In this case you can create the date value directly by using the Date functions. In this case you must specify the incoming time stamp format, so that the Date#() function knows how to parse the loaded text value.

Date(Floor(TimeStamp#(Value, 'DD/MM/YYYY hh:mm:ss')))

ajsjoshua
Contributor III

Re: Floor Condition

Hi Chanty4u,

I want to convert the date field which has data like 2017-07-05 00:00:00.000000 into 05/07/2017.

Regards,

Joshua.

ajsjoshua
Contributor III

Re: Floor Condition

Dear Chanty4u,

I have tried this

Date(Floor(TimeStamp#(DATE_OF_DEPOSIT_BANK, 'YYYY-MM-DD HH:MMSmiley FrustratedS.NNNNNN'))) as r,

and

date(date#(left(mid(DATE_OF_DEPOSIT_BANK, 1), 4) & '/' & left(mid(DATE_OF_DEPOSIT_BANK, 6), 2) & '/' &  left(mid(DATE_OF_DEPOSIT_BANK, 9),2),'YYYY/MM/DD' ), 'DD/MM/YYYY') as r,

but it doesn't works.

Regards,

Joshua.

Re: Floor Condition

try like this

makedate(left(DATE_OF_DEPOSIT_BANK,4),mid(DATE_OF_DEPOSIT_BANK,6,2),mid(DATE_OF_DEPOSIT_BANK,9,2) as Date

Community Browser