How can I modify this query to >>> @Date1 is a date (date only no time)
SELECT DISTINCT TOP (200) dbo.tb_ShowTime.VenueId, DATEADD(Hour, DATEDIFF(Hour, 0, dbo.tb_ShowTime.StartDateTime), 0) AS StartDateTime
FROM tb_ShowTime
WHERE (dbo.tb_ShowTime.IsDeleted = 0) AND (dbo.tb_ShowTime.StartDateTime BETWEEN @Date1 AND @Date2)
UNION
SELECT DISTINCT TOP (200) dbo.tb_EventSectionTime.VenueId, DATEADD(Hour, DATEDIFF(Hour, 0, dbo.tb_EventSectionTime.EventTime), 0) AS StartDateTime
FROM tb_EventSectionTime
WHERE (dbo.tb_EventSectionTime.IsDeleted = 0) AND (dbo.tb_EventSectionTime.EventTime BETWEEN @Date1 AND @Date2)
ORDER BY StartDateTime
Not sure which dbms you’re using, but in Sybase you can convert to string then back to datetime, to lose time portion. Sure you can do something similar with others.