P
phal
HI, All
I have a problem to compare the time between current time in Perl and
MySQL time, I use to compare the time according to the Year, after that
the month, and day, and hour and minutes.
The following is the way on how I compare the time
if (current_year < data_year) then ERROR_YEAR
elsif (current_year >= data_year) then OKAY_YEAR
if(OKAY_YEAR) then
if(current_month < data_month) then ERROR_MONTH
elseif(current_month >= data_month) then OKAY_MONTH
if(OKAY_MONTH) then
if(current_day < data_day) then ERROR_DAY
elseif(current_day >= data_day) then OKAY_DAY
if(OKAY_DAY) then
if(current_hour < data_hour) then ERROR_HOUR
elseif(current_hour >= data_hour) then OKAY_HOUR
if(OKAY_HOUR) then
....
Okay, I think you will understand what the alogrithm going to do, it
isn't a good ways to compare, coz, I know some guru who use a good
alogrithm to compare better then mind.
Pleas help,
Thank
I have a problem to compare the time between current time in Perl and
MySQL time, I use to compare the time according to the Year, after that
the month, and day, and hour and minutes.
The following is the way on how I compare the time
if (current_year < data_year) then ERROR_YEAR
elsif (current_year >= data_year) then OKAY_YEAR
if(OKAY_YEAR) then
if(current_month < data_month) then ERROR_MONTH
elseif(current_month >= data_month) then OKAY_MONTH
if(OKAY_MONTH) then
if(current_day < data_day) then ERROR_DAY
elseif(current_day >= data_day) then OKAY_DAY
if(OKAY_DAY) then
if(current_hour < data_hour) then ERROR_HOUR
elseif(current_hour >= data_hour) then OKAY_HOUR
if(OKAY_HOUR) then
....
Okay, I think you will understand what the alogrithm going to do, it
isn't a good ways to compare, coz, I know some guru who use a good
alogrithm to compare better then mind.
Pleas help,
Thank