ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Date verification

I have to verify if a date typed in a string control is a valid date.
Thanks to everyone.
Max P.
0 Kudos
Message 1 of 4
(3,242 Views)
Use the Match Pattern function to search for the characters you expect the user to use to delimit the month, day and year (/,-, ,). Upon the availability of the character, convert the characters before substring and check it for the corresponding part of date.
0 Kudos
Message 2 of 4
(3,238 Views)
You can use a numeric digital control and set its format to "Date and Time". When the user edits the control, the format checking is automatically done by LabVIEW.


LabVIEW, C'est LabVIEW

Message 3 of 4
(3,238 Views)
Hello,

This may be a cleaner way to verify a string date with format MM/DD/YYYY. You can rearrange the regular expression for other formats.

Good luck,
James Pham
Download All
0 Kudos
Message 4 of 4
(3,005 Views)