SAP Builders Discussions
Join the discussion -- ask questions and discuss how you and fellow SAP Builders are using SAP Build, SAP Build Apps, SAP Build Process Automation, and SAP Build Work Zone.
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with formula

Torabi
Explorer
0 Kudos

Hello,

To display today's date, I have used this formula:

dump2024-06-11.png

The result will be: 11 Jun.
What formula should I use to display tomorrow's date (12 Jun) or yesterday's date (10 Jun)?

8 REPLIES 8

marihirvi
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can use ADD_DURATION and SUBTRACT_DURATION together with FORMAT_DATETIME_LOCAL to format the date:

marihirvi_0-1718876724283.png

 

0 Kudos

Hi Marihirvi,
Thanks, it worked perfectly.
I have two more questions please:
1. Now when I use formula in my Soft tabs to display (yesterday, today and tomorrow) dates, (20 Jun, 21 Jun and 22 Jun) is displayed.

What should I add to the formula NOW("D MMM") to display today's date with label: Today?

photo-2024-06-21-1.png

2. When I launch the app, I want the Today tab to appear in the middle of the screen by default. Right now I have to swipe left to see it.

Thanks in advance for your help

0 Kudos

You mean to look like this:

Dan_Wroblewski_0-1719209063664.png

NOW("D MMM") + " - Today"



--------------
See all my blogs and connect with me on Twitter / LinkedIn

0 Kudos

Hi Dan,
Thanks for your reply.

No, I mean it like this:

Today.png

0 Kudos

So can't you just make it static text to "Today"?




--------------
See all my blogs and connect with me on Twitter / LinkedIn

0 Kudos

For the spacing, do you mean something like this:

Dan_Wroblewski_1-1719209338100.png

If you open the style for the soft tab you can play with the alignment:

Dan_Wroblewski_2-1719209418374.png

 




--------------
See all my blogs and connect with me on Twitter / LinkedIn

0 Kudos

Thanks for your reply
No, it's not about spacing!
Right now the first tab is visible on the left and after it comes the second tab and third and so on.

Today2.png

What I want is that "Today" should always be visible in the middle of the screen and when you want to see other days, then you can swipe to the right or to the left.
Like this:

Today3.png

0 Kudos

Hmm, well you can put the softtabs in a scroll view and the user can then see all the tabs by scrolling, but I don't see a way of putting Today in the middle. You can use the Layout > Position property to reposition Today to the middle of the visible area, but then you'd have to create your own scrolling capability (not really scrolling more like moving).

You could simply start with yesterday, today and tomorrow and add a previous button and a later button to, for example, remove the last item and add a new item to the end of the list. This would be pretty easy to do.

As far as I know the position of the scrollview is not retrievable and there is no property to set the position of the scroolview. 




--------------
See all my blogs and connect with me on Twitter / LinkedIn