cancel
Showing results for 
Search instead for 
Did you mean: 

How to get yesterday date in CDS views?

0 Kudos

Hi All,

How can I get yesterday date from current system date in CDS views.

Thanks,

Jagapathi.

Accepted Solutions (1)

Accepted Solutions (1)

ssurampally
Active Contributor

you can try the function,

DATS_ADD_DAYS(date,days,on_error) , -1 will be for Yesterday.

system_date will be used for current date..

more information on help documentation,

https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abencds_f1_date_time_functions.htm

0 Kudos

Thanks Sreekanth, It's working perfectly.....

{

dats_add_days( $parameters.sy_date, - 0001 ,'INITIAL' ) as Past_date

}

Answers (1)

Answers (1)

gattumahesh_at
Explorer
0 Kudos

Without using parameter can i pass system date ? It is not accepting $session.system_date

how to get it ?