Jump 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.

Show Today and yesterday in calculated date field

Featured Replies

I have a date field that is set by record created date, whenever I create a new record in this table it enters the current date.

This is a phone log field so there are literally hundreds of thousands of records.

I'm trying to create a calculation that displays the today, if the record created date is current date, and yesterday if it was yesterday and all other should be the date itself but when I create this calculation, it doesn't seem to update on a daily basis and just shows today even if the date was yesterday, unless I create a new record.

Any ideas on what I'm doing wrong here?

14 minutes ago, wattmhite said:

it doesn't seem to update on a daily basis

Is it an unstored calculation field?

--
P.S. Your title says "calculated date field". IIUC, you want the field to display the text "Today" or "Yesterday" under some circumstances. If so, this needs to be a calculation field with the result type set to Text.

  • 1 month later...

case(

datefield = get(currentdate);"Today";
datefield = get(currentdate)-1;"Yesterday";
datefield

)

 

Must be an unstored calculation and type = text as noted above.

Edited by Cable

Cable, thank you!!! That worked perfectly!!

I have a super trick/hard question to go with this: Is there any way possible, to make sure this calculation field displays the date field in xx/xx/xx format? IE not the 4 digit year? 

9 minutes ago, Matthew R White said:

make sure this calculation field displays the date field in xx/xx/xx format?

What exactly is " xx/xx/xx format"? It could be MM/DD/YY or DD/MM/YY or any other combination of the three.

 

10 minutes ago, Matthew R White said:

Cable, thank you!!! That worked perfectly!!

I have a super trick/hard question to go with this: Is there any way possible, to make sure this calculation field displays the date field in xx/xx/xx format? IE not the 4 digit year? 

Are you trying to create Y2K all over again????? lol

Substitute ( datefield; year(datefield); Right ( year(datefield); 2))

Haha no I am not!!!!! 

Thank you!!

 

On 10/25/2019 at 6:14 PM, bcooney said:

Display:

image.png.06ed8cf839eee12a9e1fedade0800359.png

Sure, if it was a date field. But this is a text field so that won't work.

Create an account or sign in to comment

Important Information

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

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.