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.

Less than with date not calculating correctly?

Featured Replies

  • Newbies

I am having some weird results. I have a calculation that is

if(ReadingDate<10/31/2005,"Y","N")

when I enter a date that is less than 10/31/2005 it returns "N" everytime. The weird thing is that if I use greater than, it resolves correctly.

Any ideas?

The use of 10/31/2005 is NOT a date.

You must use the function

Date (month; day; year)

to generate a date that can be used for comparison purposes

HTH

I generally use the GetAs function probably a little too much, but I like to be sure that the calc works the way I intend it too, in your case I would do.


If(GetAsDate(ReadingDate) < GetAsDate("10/31/2005"); "Y"; "N")

Again, thats not normally neccessary for when your refrencing a field that is set up as a date, but when you start using variables, and say, global fields, or text fields, I think its a good idea to include it.

GetAsDate ( text ) is problematic, because the interpretation of text depends on the current file/OS settings. Best to stick with the Date() function.

  • Author
  • Newbies

Many thanks, the Date(M,D,Y) worked.

GetAsDate ( text ) is problematic, because the interpretation of text depends on the current file/OS settings. Best to stick with the Date() function.

Comment,

I've never had any problems with this. Could you give me a scenario where this could become problematic?

Just want to make sure this won't cause issues in any of my other files.

For example, GetAsDate("10/12/2005") returns the date of December 10, 2005 - if the file/OS is set to use the m/d/y format. The same calculation returns a "?" if the date format is d/m/y.

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.