cancel
Showing results for 
Search instead for 
Did you mean: 

first and Last Date of a Month

Former Member
0 Kudos

Hi Experts, I need  first  and last date in a month, for example 11/01/2014(mm/dd/yyyy) and  11/30/2014, PLease let me know how to achieve this Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

You can get the first day of the month using below function.

add_months(last_date(sysdate()), -1) + 1

Thanks,
Ancy

former_member208363
Active Participant
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks everyone for your support

Former Member
0 Kudos

Hi Experts, I need First date  and last date of Previous month Thanks

former_member208363
Active Participant
0 Kudos

Please check this.

FirstDay_PrevMonth: add_months(last_date(sysdate()), -2) + 1

LastDay_PrevMonth: last_date( add_months(sysdate(),-1))

Former Member
0 Kudos

I have figured it out First date of Previous month-- add_months( last_date( sysdate( )),-2) +1 Last Date of Previous month --add_months( last_date( sysdate( )),-1) Thanks

former_member208363
Active Participant
0 Kudos

last_date('1990.10.01')  returns '1990.10.31'.

I did not find the function for first day of the month.

former_member27665
Active Participant
0 Kudos

Use last_date() function.

Thanks & Regards
lal