on 12-07-2016 10:48 AM
Dear NG,
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 oen
- 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
Hi Henning,
Assuming that the data type of date_now is Date, try to use this formula.
Date_Old
=Todate(FormatDate(RelativeDate([date_now];-1;YearPeriod);"MM")+"/01/"+FormatDate(RelativeDate([date_now];-1;YearPeriod);"yyyy");"MM/dd/yyyy")
Try that and let us know.
Thanks,
Mahboob Mohammed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.