First Day of a Month
An SQL that takes a date value such as 01/15/2008 and returns the first day of that month. In our example, the first day for Jan of 2008 is Tuesday.
Last Day of a Month
Fortunately Oracle has the LAST_DAY function to do that. Here is an SQL on how to use it.
| Title | Under | Posted on |
|---|---|---|
| MD5 - SHA checksum of a file. | PeopleSoft Technical | 02/07/2012 - 5:29am |
| nVision Tabular Report through PIA with prompts | PeopleSoft Technical | 02/02/2012 - 10:07pm |
| Can we create an AE to mass update Position - Jobcode data? | PeopleSoft Technical | 01/18/2012 - 3:11am |
| Pay Components on job data can be defaulted and setup based on the rules? | PeopleSoft Functional | 01/05/2012 - 4:58am |
Comments
I was asked a question on how could we get the last day of the month if we only know the month (like 07 for july) and not the whole date? and here is how:
SELECT LAST_DAY (TO_DATE (:2, 'MM'))
FROM DUAL;
7/31/2008
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
Post new comment