July 31, 200421 yr 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?
Create an account or sign in to comment