Jump to content

Less than with date not calculating correctly?


This topic is 6577 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6577 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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