validating dates

liunx

Guest
Hi all
Does anyone know how to validate dates in perl CGI
I know how to validate the input as numeric but I need to ensure that it is in date format to write back to an access database. Thanks in anticipation.
AnnetteWhat you could do instead, is make sure the date arrives to the script already in the desired format. Code the form so the date is entered using select fields instead of text fields.

HTH,
KevinWould love to but I'm not sure that is what is required in the assignment. Maybe.....I'll see.Annette,

The following might be helpful:

<!-- m --><a class="postlink" href="http://perl.jann.com/cgi-list/200104/msg00243.html">http://perl.jann.com/cgi-list/200104/msg00243.html</a><!-- m -->
<!-- m --><a class="postlink" href="http://perl.jann.com/cgi-list/200104/msg00238.html">http://perl.jann.com/cgi-list/200104/msg00238.html</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.planet-source-code.com/xq/ASP/txtCodeId.140/lngWid.6/qx/vb/scripts/ShowCode.htm">http://www.planet-source-code.com/xq/AS ... owCode.htm</a><!-- m -->

Also, you may want to look into the module 'Date::Calc'

URL -> <!-- m --><a class="postlink" href="http://www.cpan.org/authors/id/S/ST/STBEY/Date-Calc-4.3.tar.gz">http://www.cpan.org/authors/id/S/ST/STB ... 4.3.tar.gz</a><!-- m -->

It has has a check_date function used for checking valid dates.


Regards,Thanks guys,

Success is mine and yours and yours and yours.

Annette
 
Top