Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

13 Replies
johngouws
Partner - Specialist
Partner - Specialist

Hi,

It may not be perfect, but how about:

Makedate(Year([Delivery Beg Date]), Month([Delivery Beg Date], Day([Delivery Beg Date])).

You cane play around with the format as you wish.

Regards,

J

Not applicable
Author

Hi Sahana,

Can you please try the below logic and see whether this works fine ?

LOAD

Date(`date1`,'MM/DD/YYYY') as `date2`;

SQL Select date2 from table_name;

The above code fetches only one field from  the table. While loading the value we convert the field as per our requirement and then we select the same field from the SQL table.

simenkg
Specialist
Specialist

=Date(Floor(Date#([Delivery Beg Date],'DD/MM/YYYY hh:mm')))

You need the hh:mm part and there were some parenthesis that were placed incorrectly.

Not applicable
Author

thanks a lot everyone