This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Feb 16, 2017, 8:46 AM
11 Posts

NotesDateTime problem

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 1

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

Feb 21, 2017, 10:20 PM
323 Posts
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.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal