How can we validate any date format like todays date(02/15/06)?

Showing Answers 1 - 4 of 4 Answers

vidyank

  • Feb 23rd, 2006
 

HITHIS BELOW CODE IS FOR VALIDATING TODAYS DATEJUST COPY AND PASTE IN EXPERT VIEW. AND RUN.AS DATE CHAGES EVERY DAY IT GIVES THE CORRECT DATE.Function todaydate'Return current monthCurr_Month = Month(Now)a=len(Curr_Month)If a=1 ThenCurr_Month = "0"&Curr_MonthEnd If'Return current dateCurr_Day = Day(Now)b=len(Curr_Day)If b=1 ThenCurr_Day = "0"&Curr_DayEnd If'Return current yearCurr_Year =Year(Now)c=Len(Curr_Year)If c=4 ThenCurr_Year = Right (Curr_Year, 2)End If todaydate = Curr_Month&"/" & Curr_Day &"/" & Curr_YearEnd Function 'Function callmsgbox todaydateGOOD LUCKVIDYA

  Was this answer useful?  Yes

srinivas

  • Sep 22nd, 2006
 

m=month(date)msgbox m

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions