on 05-03-2015 10:38 AM
Hi,
For displaying current date in design studio we will user "APPLICATION.getInfo().dateNow. Is there any possibility of displaying Yesterdays Date, in SAP Design studio.
As a follow-up to my suggestion, here's an implementation example.
Script to calculate yesterday's date:
var today = APPLICATION.getInfo().dateNowInternalFormat;
SIMPLEDATE_1.initializeWithInternalDate(today);
var todayFormatted = SIMPLEDATE_1.format("DD.MM.YYYY");
SIMPLEDATE_1.rollDays(-1);
var yesterdayFormatted = SIMPLEDATE_1.format("DD.MM.YYYY");
TEXT_1.setText("Today is " + todayFormatted + ". Yesterday was " + yesterdayFormatted + ".");
Before calculation:
After calculation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.