|
|
|
7i24.Com不停为您服务 获取服务器的当前日期函数,返回的日期格式为"YYYY-MM-DD"
作者: xiaohe
本函数用于将获取服务器的当前日期,返回的日期格式为"YYYY-MM-DD"
'---------------------------------------------------------------------------
Function AHshGetServerCurrentDate
Dim strTmp, iYear,iMonth,iDate
iYear = Year(Date)
iMonth = Month(Date)
iDate = Day(Date)
strTmp = CStr(iYear) & "-"
If iMonth < 10 Then
strTmp = strTmp & "0" & Cstr(iMonth) & "-"
Else
strTmp = strTmp & Cstr(iMonth) & "-"
End If
If iDate < 10 Then
strTmp = strTmp & "0" & Cstr(iDate)
Else
strTmp = strTmp & Cstr(iDate)
End If
AHshGetServerCurrentDate = strTmp
End Function
|
|
|