31
Views
10
Comments
Comapre given date is in the past or not by comparing the current date

Hi Team,

How can I compare a given date is in the past or not by comparing the current date in a traditional web.

I need to check the end date, if the end is in the past (when compared to current date) I have to disable a button and vice versa, Please suggest. Thanks in advance

Regards,

Madhu

Rank: #95

Hi Madhu,

If you want to compare a given date (YourDate) with current date to verify if the date is in the past or not, you can simply do this validation:

YourDate < CurrDate()


Kind regards,

Rui Barradas

How about using ..


Regards,

Rama

Rank: #648

Hi Madhu,

Inside the "Enable" property of button just use the check as mention below:(here date is your input)

Date > CurrDate()

Hope this will help you.

Regards,

Vipasha

Rank: #920

Madhu Sudhan wrote:

Hi Team,

How can I compare a given date is in the past or not by comparing the current date in a traditional web.

I need to check the end date, if the end is in the past (when compared to current date) I have to disable a button and vice versa, Please suggest. Thanks in advance

Regards,

Madhu

 

Hi Madhu, You can use the diff date function to compare between two dates .

For example : If you want to check if a persons age is above 18,

DiffDate(DateofBirth,CurrDate())>18*365.

Hope this helps