سلام مي توني از کد زير استفاده کني اگر مشکل داشتي بپرس
Dim modifyDate
public Function M2SDate(myDate)
dim ifday,ifmonth,ifYear,ifdayOfyear
dim iyear,idayOfyear
dim iNumDayOfyear
dim aifMonthDays
aifMonthdays=array(31,31,31,31,31,31,30,30,30,30,30,29)
iNumDayOFYear =365
iyear=year(mydate)
idayOfyear=datepart("Y",mydate)
if isly(iyear-1) then
inumdayofyear = 366
aifmonthday(12)=30
end if
IF (IDAYoFyEAR >79) THEN
ifyear= iyear - 621
ifdayOfyear = idayOfyear - 79
ELSE
ifyear= iyear - 622
ifdayOfyear = (inumdayofyear - 79) +idayOfyear
END IF
ifday = ifdayofyear
while (ifday > aifmonthdays(ifmonth))
ifday = ifday - aifmonthdays(ifmonth)
ifmonth = ifmonth +1
wend
ifmonth = ifmonth +1
M2SDate=ifDay & "/" & ifmonth & "/" & ifyear
end Function
function isly(nyear)
isly= (((nyear Mod 4)=0 And (nyear Mod 100)<>0 ) Or (nyear Mod 400)=0)
end function
Sub showfdate(myDate)
ModifyDate=M2SDate(myDate)
End Sub