Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Easy calculation, for some.

Featured Replies

What am I doing wrong? I've tried lots of combinations, except the right one.

Case (Get ( CurrentDate ) - Backup_CreationDate & " Day Ago" ;

Get ( CurrentDate ) - Backup_CreationDate & " Days Ago")

I would like this to display

1 Day Ago or 2 Days Ago not "1 Days Ago" it looks horrid.

Thanks

Did you try;

Get(currentdate) -1

or

Get(currentdate)-2

Try perhaps =


Let ( 

n = Get ( CurrentDate ) - Backup_CreationDate 

;

Choose ( Min ( n ; 2 ) ; "Today" ; "Yesterday" ; n & " Days Ago" )

)

Edited by Guest

If you want to truly stick with your wording, Mickdn, it would be:

Let ( diff = Get ( CurrentDate ) - Backup_CreationDate ;

diff & " day" & Case ( diff > 1 ; "s" ) & " ago."

)

Hi Michael, did you forget a -1? I like yours better and mine doesn't account for today properly either, displaying 0 day ago. :wink2:

Mine should be adjusted to:

Let ( diff = Get ( CurrentDate ) - Backup_CreationDate - 1 ;

Case ( not diff ; "Today" ;

diff & " day" & Case ( diff > 1 ; "s" ) & " ago."

) )

Yep, yours is much nicer. :^)

  • Author

Hi Lee, not to sure what you mean, but tried your suggestion and all I get is "-1 Days Ago" or "-2 Days Ago".

Thanks

This calculation must also be set to 'do not store' in Storage Options or it will not update and be sure calculation result is text.

So best calc is Comment's:

Let (

n = Get ( CurrentDate ) - Backup_CreationDate

;

Choose ( Min ( n ; 2 ) [color:red]- 1 ; "Today" ; "Yesterday" ; n & " Days Ago" )

)

Edited by Guest

Hi Michael, did you forget a -1?

I don't think so... Why do you feel it's required? Isn't "0 days ago" today?

  • Author

Thanks LaRetta, your calc works perfectly. Things look much nicer now and it seems I was a long way off with my Case calculation.

That's okay I missed read your need.

Hi Michael, :blush2:

I had used a file with field Today (where I plug in a date) but I simply copy/pasted your calc, which of course used Get ( CurrentDate ). Then I typed 8/31 into today (which was the current day I thought, which was also wrong). It produced incorrect and I was thinking you didn't account that Choose() starts at zero. Too tired; my mistake; sloppy behavior; my apology. :wink2:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.