Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

removing timestamp from date field.need help,not working after trying floor as well

hi all,

request someone to help me resolve the below iss ue.

I have a field called date1 in script from which I want to remove the timestamp and rename as date2 and hence use this to join another table which has date2.

I tried  the below but both did not work please can some one guide me???

Date(Floor([Delivery Beg Date])) as Delivery Beg Date1

DATE(FLOOR(Timestamp#([Delivery Beg Date])),'DD/MM/YYYY') as  Delivery Beg Date1


I have attached the test file with a text box as well but it doesn't work.

regards,

Sahana

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Were missing the hh:mm part of format. It works like:

DATE(FLOOR(Timestamp#([Delivery Beg Date],'DD/MM/YYYY hh:mm') )) 

View solution in original post

13 Replies
jonathan_dau
Contributor III
Contributor III

Hi Sahana,

Have you tried this?

Date(Floor(Date#(date1)),'DD/MM/YYYY') as Date2

Hope that helps

Jon

tresesco
MVP
MVP

Perhaps a bracket issue. Try like:

DATE(FLOOR(Timestamp#([Delivery Beg Date],'DD/MM/YYYY') )) as  Delivery Beg Date1

Not applicable
Author

hi Jon,

Yes I did try it but still it doesn't work.

I have attached the  test file ,where I have tried it in he text box.Please have a look and help me out.

Sahana

PrashantSangle

Hi,

Just try with

Date(Floor(DateFieldName)) as NewDate

or

Date(Floor(date#(DateFieldName,'DD/MM/YYYY hh:mm:ss'))) as NewDate

Regards

R

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Tresesco,

It doesn't work,I tried it.Can check in the file attached

Sahana

jonathan_dau
Contributor III
Contributor III

I have tried this but it looks a bit ugly

Date(Floor(Date#(SubField([Delivery Beg Date],' ',1))),'DD/MM/YYYY')

tresesco
MVP
MVP

Were missing the hh:mm part of format. It works like:

DATE(FLOOR(Timestamp#([Delivery Beg Date],'DD/MM/YYYY hh:mm') )) 

Anonymous
Not applicable
Author

Try left(Datefield,10) and convert the format.

I couldn't load the file due to source unavailability.

Check and let me know

ashfaq_haseeb
Champion III
Champion III

Hi,

Please find the attached working file.

Regards

ASHFAQ