Tag: Trunc

  • Truncate time part from Datetime column or literal in Oracle SQL

    I have shown how to truncate the time part from a datetime column value in SQL Server T-SQL in one of my previous posts here – http://pivotronics.com/2012/12/19/comparing-datetime-column-with-a-date-literal-in-t-sql/ Here is the same (how to truncate the time part from a datetime column value) in Oracle SQL: TRUNC(datetime_column) or TRUNC(datetime_expression) very straight…

  • Comparing datetime column with a date literal in T-SQL

    Hi Friends.. I have seen that comparing a datetime column in a table in SQL Server database, that has both date and time parts (e.g. 2012-12-05 10:37:36.897) with a date literal that has only date part is a not straight forward. Let me explain with an example: Have created a…