2011-12-09 24 views
1

私は従業員が生年月日を入力するフィールドを含む蓮のアプリケーションを持っています...従業員の年齢は18歳以上であることを検証したい現在の日付より。 どうすればいいですか?年齢を18歳以上、今日の日付から数えて

私は

diff :[email protected](@Today)[email protected](@ThisValue); 
@If(@ThisValue = ""; @Return("Please enter 'Date of Birth'."); @ThisValue != "" & @Date(@ThisValue) > @Date(@Today); @Return("'Date of Birth' should not be greater than 'Today Date'."); diff <18; @Return("'Age' cannot be less than 18yrs."); @Success) 

をした。しかし、これは唯一の現在の年を計算....どのように私は、現在の日付を計算するのですか?

答えて

2

利用機能@Adjust(dateToAdjust ; years ; months ; days ; hours ; minutes ; seconds ; [DST])

@Adjust(@Now;-18;0;0;0;0;0) 

と従業員の誕生日にそれを比較

関連する問題