Friday, March 30, 2012

Oracle: get first week day or first day in month

To get the first day of the month

select trunc(SYSDATE, 'MM') from dual;


To get the first weekday of the week, DY means Sunday, IW is Monday



select trunc(SYSDATE, 'DY') from dual;

No comments:

Post a Comment