Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

date conversion

Hi All,

Sorry for asking basic question.

I have string field called year .And I am trying  to add 1 more year to that.But I am getting error like bad date format.

Please suggest

dateadd(''yyyy'',1,date({OBJSETTING_MASTER_DATA.YEAR}))

Tags:
Former Member
Former Member replied

Hi

If this field consist of only year then you can do the following :

Tonumber(({OBJSETTING_MASTER_DATA.YEAR}) +1

or

If you have date then

date(Year(cdate(({OBJSETTING_MASTER_DATA.YEAR}))+1, Month({OBJSETTING_MASTER_DATA.YEAR}), Day({OBJSETTING_MASTER_DATA.YEAR}))

-Sastry

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question