If [Modified] Date is older than [TODAY]
AnsweredHello,
I like to hide a button depending on the age of the item last modified, means if the item has been modified today the button should not be displayed. If the item is older than today the button should show up.
To achieve this I set:
[[Modified]] < new Date()
However, regardless how old the item in the list is. The above formula, when testing is always "true". I checked the opposite
[[Modified]] > new Date()
and all tests result into "false". I also tested against the creation date, but same results. So I wonder what I am doing wrong?
Any idea? Many thanks...
Any idea? Many thanks...
Cheers
Joerg
Joerg
0
-
Official comment
Hi Joerg_K.
new Date() gives you the current date including time, which is always bigger than the modified time. To compare it with the current date at midnight you would have to set the hours to 0 like this:
[[Modified]] < new Date().setHours(0, 0, 0, 0)
Hope this helps.Kind regardsskybow Support -
Thanks a lot this works now as imagined :)
0 -
Great to hear, thanks for the feedback.
Kind regards
skybow Support
0
Please sign in to leave a comment.
Comments
3 comments