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 |
|---|---|---|
| Abs Mgmt: How can Abs rule pro-rate contractor's last month's entitlement (need help urgently) | PeopleSoft Functional | 03/10/2010 - 9:21pm |
| Can we user LONG datatype as a search option in PeopleSoft | PeopleSoft Technical | 03/10/2010 - 11:22am |
| special caracters are not translated correctly when ftp from windows to unix | Programming | 03/09/2010 - 3:23pm |
| How to view the employees from particular country in peoplesoft? | PeopleSoft Technical | 03/03/2010 - 1:56am |
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