[This topic is migrated from our old forums. The original author name has been removed]
We recently staring using DBVisualizer and I am having an issue joining on dates correctly. We have a table that we use to determine reporting periods start-end dates and doesn't have time on the date. The table we are currently join to has time on the date field. Is there a way to remove the timestamp on the date in the join for the report to run correctly. Currently we are using the following for SQL:
CAST(CONVERT(nvarchar(10),transaction_date, 101) AS datetime)
Thanks in advance,
Shawn
Hi Shawn,
Sorry, but this a question you need to ask in a forum for the database you use. DbVisualizer just sends the SQL to the database and is not involved in processing it.
Best Regards,
Hans
a
anonymous
said
over 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Remove Time from Data in Join
Oh, how I wish SQL*Server had a date truncation command like Oracle (and don't get me started on TO_CHAR). Although this question would be more appropriate for a forum like Stack Overflow, I feel your pain. This is what I use:
dateadd(dd, datediff(dd,0, transaction_date), 0)
... but there are other methods.
anonymous