NotesDateTime problem

Hi,

I’m importing data from an excel file, there are date values too and I have to check whether the value is a real date or not. The date format on my computer is “yyyy.mm.dd” (Hungarian). The problem is, that if I have a value like 'a.b.c" the NotesDateTime(“a.b.c”) return a valid date 2017.04.01. The funny think is, that the returned value is independent what text do I enter, so for NotesDateTime(“s.d.f”) the value is the same. If there is no separator (in my case the dot), then I get invalid date, which is OK.

Any idea how can I solve this?

Regards, Attila

Subject: Well, you could –

… parse the value. split() the value based on the dots involved, right?

Then you can look at each & see if it’s a number.

LotusScript has a DateNumber() function that should be able to convert the parsed values too, if you want to avoid any unexpected formats for invalid dates. I’m sure a tester could hammer it hard enough to jam something “bad” in there.