Come on. That's easy :-) Parse Arg dt If dt='' Then dt=19660230 Signal on Syntax x=date('S',dt,'S') Say dt 'is valid' Return 1 Syntax: Say dt 'is not valid' Return 0 Greetings Walter
> P.O. Jonsson <oor...@jonases.se> hat am 24.04.2025 17:01 CEST geschrieben: > > > That is the problem, not the solution ;-) I want to have a logical value to > test on, not a broken value function call > > Hälsningar/Regards/Grüsse, > P.O. Jonsson > oor...@jonases.se > > > > > > > Am 24.04.2025 um 16:58 schrieb WalterPachl <pa...@chello.at>: > > > > F:\>rexx datecheck > > 1 *-* say date('S',19660230,'S') > > Error 40 running F:\datecheck.rex line 1: Incorrect call to routine. > > Error 40.19: DATE argument 2, "19660230", is not in the format described by > > argument 3, "S". > > > > > P.O. Jonsson <oor...@jonases.se> hat am 24.04.2025 16:45 CEST geschrieben: > > > > > > > > > I have records coming in with potentially illegal dates, like ccyymmdd = > > > "19660230" > > > > > > How does one go about checking if an entity is a valid date (30th of > > > February is a real case coming in), my further processing relies on this > > > so the program breaks for illegal dates. > > > > > > I thought there would be a method date~isvaliddate() or something to use > > > but I cannot find anything like that. I would prefer not to parse and > > > check days months years etc. entering the number above in date() > > > invariably breaks the processing. > > > > > > Any ideas anyone? > > > > > > Hälsningar/Regards/Grüsse, > > > P.O. Jonsson > > > oor...@jonases.se > > > > > > > > > > > > _______________________________________________ > > > Oorexx-users mailing list > > > Oorexx-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/oorexx-users > > > > > > > > > LG > > > > Walter > > > LG Walter
_______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users