-
Re: Date and time fucntions
Ali Hijazi Feb 1, 2018 3:01 AM (in response to Mike Slottje)may you please share a sample file so that we can help rapidly
-
Re: Date and time fucntions
Mike Slottje Feb 1, 2018 3:20 AM (in response to Ali Hijazi )Hi Ali,
I've uploaded an example qvf file to my first message in this discussion!
-
Re: Date and time fucntions
Ali Hijazi Feb 1, 2018 3:51 AM (in response to Mike Slottje)='Orders entered '&
if(num(WeekDay(Today()))= 6,(WeekDay(date(num(today())-2))),(WeekDay(date(num(today()))-1)))
&' '&
if(num(WeekDay(Today()))= 6,(date(num(today())-2)),(date(num(today())-1)))
this is how it should be
be aware that date() expects a number while today() is a timestamp
weekday expects a date-
Re: Date and time fucntions
Mike Slottje Feb 1, 2018 3:53 AM (in response to Ali Hijazi )Thanks for your help Ali!
-
-
-
-
Re: Date and time fucntions
Marcus Sommer Feb 1, 2018 3:18 AM (in response to Mike Slottje)You don't do today()-1 else weekday(today())-1 and therefore you get a numeric result. By weekday(today()-1) you should get the string-representation of the result. Beside this you could just format a date like you need it - ry it with something like:
= date(today()-(-alt(weekday(today())=6,0)+1), 'WWWW DD.MM.YYYY')
- Marcus
-
Re: Date and time fucntions
Mike Slottje Feb 1, 2018 3:24 AM (in response to Marcus Sommer )Hi Marcus,
your first sentence already solved my first issue, thanks a lot!
Do you also know how to fix this with a time component and a now() expression?
-
Re: Date and time fucntions
Marcus Sommer Feb 1, 2018 3:28 AM (in response to Mike Slottje)What do you mean with "... time component and a now() expression"?
-
Re: Date and time fucntions
Mike Slottje Feb 1, 2018 3:35 AM (in response to Marcus Sommer )I want to show the date of yesterday if the time of opening was before 16:00:00.
If the time of opening was after 16:00:00, I want to show the date of today.
FYI, I've uploaded a sample qvf file to my first message in this discussion.
-
Re: Date and time fucntions
Marcus Sommer Feb 1, 2018 3:43 AM (in response to Mike Slottje)Maybe with something like: date(today()-if(hour(now(2))<16,1,0), 'Format')
- Marcus
-
Re: Date and time fucntions
Mike Slottje Feb 1, 2018 3:48 AM (in response to Marcus Sommer )Thanks Marcus, you helped me a lot!:)
-
-
-
-
-