Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

distinct date

Hi, I have date column of format MM/DD/YYYY HH:MM:SS AM/PM (EX: - 6/16/2010 10:46:15 PM).

I want to add multiple box for Date column to allow user to select a date. But the issue is I have multiple rows with same date with difference in time. How do I ignore time and show distinct date in multiple box.

Thanks in Advance

3 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

Hours and minutes are fractions of days. You should convert your date to a numeric value, round it then convert it again with a date format. Something like: date(floor(num(DATE)),'DD/MM/YYYY')

Not applicable
Author

Thanks a ton for the reply.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

Handling as a numeric works fine, but I find that using the daystart function is a bit more readable:

DayStart(CreatedAt) as CreatedDate,

There are also functions for MonthStart and YearStart, which can also be useful if you want to aggregate down a bit, but still have the value as a date that can be compared to other date values.

Regards,
Steve