Skip to Content
0
Dec 07, 2016 at 12:31 PM

converting a date

417 Views Last edit May 04, 2018 at 05:22 PM 2 rev

Dear experts,

I have trouble converting a date.

There is a given field in WEBI called "date_now" and I would like to convert this date and write it into a new variable called "date_old".

The following canversions should be done:
- reduce the year by 1
- set the day to 01

For example:

date_now = "07.12.2016" ---> date_old = "01.12.2015"
date_now = "23.05.2016" ---> date_old = "01.05.2015"
date_now = "17.03.2014" ---> date_old = "01.03.2013"

It seemed quit easy in the beginning, but now I am struggling ...
Any help is appreciated!

TIA,
Henning