CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> Archive -> GotoCode Archive

 Date Validation in CCS

Print topic Send  topic

Author Message
Posted: 12/22/2003, 8:27 AM

I am tring to validate a date in CCS. I have the Default Value set to '01/01/2004' and Date Type set to Date. I need to validate that the user input is >= '01/01/2004'. How do i accomplish this? Thanks
Posted: 12/22/2003, 8:55 AM

I'm using PHP
Posted: 12/22/2003, 10:40 AM

This is what I did, probably not the best way to do it, but it seems to work,

$BeginDate = mktime (0,0,0,1,1,2004);
$MonthPart = substr ($this->s_Reported_Date->GetText(), 0, 2);
$DayPart = substr ($this->s_Reported_Date->GetText(), 3, 2);
$YearPart = substr ($this->s_Reported_Date->GetText(), 6, 4);
$ReportedDate = mktime(0,0,0,$MonthPart,$DayPart,$YearPart);

if($ReportedDate < $BeginDate) {
$this->s_Reported_Date->Errors->addError("Enter another Date");


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.