Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date and time fucntions

Goodmorning experts,

I have two questions regarding a date and a time function.

  • Date:

I have a visualisation which shows the number of entered orders.

In the title of this visualisation, I want to show the name of the day and the date for yesterday.

I'm using the following expression:

='Orders entered '

&

if(num(WeekDay(Today()))= 6,(WeekDay(today())-2),(WeekDay(today())-1))

&' '&

if(num(WeekDay(Today()))= 6,(date(today())-2),(date(today())-1))

The expression shows me the numeric WeekDay and the numeric date of yesterday, where this should be the name of the day and the date in 'DD-MM-YYYY'.

Funny thing is, that this expression works as I want for today(), but not for (today()-1).

Any idea how to solve this problem?

  • Time:

To improve the data in this chart, I want to show the data of yesterday if the time of opening the sheet is before 16:00:00 ('h:mm:ss').

Otherwise, the chart should show the data of today. So, I'm searching for a proper expression for the following if statement:

if( "date of opening" < 16:00:00, date of yesterday, date of today)


Any idea how to write such an expression?


Hope you guys could help me out!


Cheers,

Mike

10 Replies
Anonymous
Not applicable
Author

Thanks for your help Ali!