Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ajsjoshua
Specialist
Specialist

Floor Condition

Dear all,

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

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

Thanks & Regards,

Joshua.

5 Replies
Chanty4u
MVP
MVP

try this

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

Chanty4u
MVP
MVP

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
Specialist
Specialist
Author

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
Specialist
Specialist
Author

Dear Chanty4u,

I have tried this

Date(Floor(TimeStamp#(DATE_OF_DEPOSIT_BANK, 'YYYY-MM-DD HH:MM:SS.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.

avinashelite

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