Last name: Nightingale SDB Popularity ranking: 1104 This unusual name is of Anglo-Saxon origin, and is a nickname surname for someone with a good, sweet singing voice, from the bird, the nightingale.
You are doing everything right by using a to_date function and specifying the time. The time is there in the database. The trouble is just that when you select a column of DATE datatype from the database, the default format mask doesn't show the time.If you issue a. alter session set nls_date_format = 'dd/MON/yyyy hh24:mi:ss'.ou are doing everything right by using a to_date function and specifying the time. The time is there in the database. The trouble is just that when you select a column of DATE datatype from the database, the default format mask doesn't show the time.
The DATEADD function simply allows you to add or subtract the specified number of units of time to a specified date/time value. The format of the DATEADD function is as follows: DATEADD(<Unit of time>, <Units>, <Date>) -- to add 5 days to September 1, 2011 the function would be. DATEADD(DAY, 5, '9/1/2011') -- to subtract 5 months from September 1, 2011 the function would be. DATEADD(MONTH, -5, '9/1/2011') A thing to note is that the date format can be any date format that SQL Server recognizes such as: 9/1/2011. 9/1/2011 12:30.