Link to home
Start Free TrialLog in
Avatar of holemania
holemania

asked on

SQL - First Month of Year and Last day of previous month.

I have a need to pull the first month of current year and then also pull the previous month end.

Example:  

1/1/2013 - 7/31/2013

I'm doing a parameter with a report and need to have this date automatically populated.  I am able to get the end of month for last month.  However, I can't seem to get the first month for the year at beginning of month.
Avatar of Sean Stuber
Sean Stuber

select trunc(sysdate,'yyyy'), trunc(sysdate,'mm') - 1 from dual
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial