Oracle stores date in an internal numeric number
The default date and input format for any date is DD-MON-YY.
If you want to change the default date time then ,Set default datetime format in string literals by running below quer.
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MM-YYYY';
The default date and input format for any date is DD-MON-YY.
If you want to change the default date time then ,Set default datetime format in string literals by running below quer.
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MM-YYYY';
SQL date functions are:
Oracle | ||
1 | ADD_MONTHS | Add specified number of months |
2 | EXTRACT for Datetime | Extract day, month, year etc from datetime |
3 | LAST_DAY | Get last date of month |
4 | MONTHS_BETWEEN | Get number of months between two dates |
5 | TO_CHAR for Datetime | Convert datetime to string |
6 | TO_DATE | Convert string to datetime |
7 | TRUNC for Datetime | Truncate datetime |
No comments:
Post a Comment