Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi--

I have upgraded a database from 6.0 to 7.0 and am having a problem with a date calc field. The calc is supposed to handle a date which is entered in the format:

5/03/03 11:51:24 PM EST

And have the result of date:

5/03/03

The calculation is as follows. The first part handles dates which were entered in another format before the present format had started to be used. The second handles the current format:

EDITED (sorry about that!):

If(MiddleWords(Enter Date;2;1) =  "Feb"  and GetAsNumber(LeftWords(Enter Date;1)) 

<= 15 or MiddleWords(Enter Date;2;1) =   "Jan"; GetAsDate(If(MiddleWords(Enter Date;4;1) >= 24; 

Case(MiddleWords(Enter Date;2;1) = "Jan";"1";MiddleWords(Enter Date;2;1) = "Feb"; "2";"3") & "/" & 

GetAsNumber(LeftWords(Enter Date;1)-1) & "/2002"; 

Case(MiddleWords(Enter Date;2;1) = "Jan";"1/";MiddleWords(Enter Date;2;1) = "Feb"; "2/";"3/") 

&  LeftWords(Enter Date;1) & "/" & "2002")); 

Date(LeftWords(Enter Date;1);MiddleWords(Enter Date;2;1);MiddleWords(Enter Date;3;1)+2000) )

This calc worked fine in 6.0, but in 7.0 is coming up as nothing but invalid dates. But the weird thing -- only for *new* entries. All the old records have valid dates in them.

As well, I tried entering an old date which is showing a valid result in a previously entered record (the one in the above example) in a new record, it too comes up as invalid.

What am I doing wrong?

This topic is 7419 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.