西安网站建设ASP格式化日期为英文格式

10542015-04-10

西安网站建设ASP格式化日期为英文格式,复制请注明版权,

Public Function FormatDate_en(DateAndTime,para)

On Error Resume Next

Dim y, m, d, h, mi, s, strDateTime,months,weeks,w

FormatDate_en = DateAndTime

If Not IsNumeric(para) Then Exit Function

If Not IsDate(DateAndTime) Then Exit Function

y = CStr(Year(DateAndTime))

m = CStr(Month(DateAndTime))

d = CStr(Day(DateAndTime))

w=Weekday(DateAndTime)

select case m

case "1"

months="Jan"

case "2"

months="Feb"

case "3"

months="Mar"

case "4"

months="Apr"

case "5"

months="May"

case "6"

months="Jun"

case "7"

months="Jul"

case "8"

months="Aug"

case "9"

months="Sep"

case "10"

months="Oct"

case "11"

months="Nov"

case else

months="Dec"

end select

select case w

case "2"

weeks="Monday"

case "3"

weeks="Tuesday"

case "4"

weeks="Wednesday"

case "5"

weeks="Thursday"

case "6"

weeks="Friday"

case "7"

weeks="Saturday"

case else

weeks="Sunday"

end select

'strDateTime = weeks &", " &months&", "& d &", "& y

'strDateTime = months&" "& d &", "& y

Select Case para

Case "0"

strDateTime = "<b>" & d & "</b>" & months

Case "1"

strDateTime = months & " " & d &" " & y

Case "2"

strDateTime = weeks&  " / "&months & " " & d

Case Else

strDateTime = months&" "& d &", "& y

End Select

FormatDate_en = strDateTime

End Function

通过本文您对西安网站建设有了进一步了解,本公司温馨提醒:找西安做网站公司,请选择手续齐全、业务精、服务好的正规公司。

工商网上亮照

版权所有:西安点墨网络科技有限公司 信息备案编号: 陕ICP备11004160号-1

客户服务电话:15229292610

公司注册地址:西安市雁塔区融鑫路丽湾蓝岛1幢3单元16层31605号

临时办公地址:西安市雁塔区朱雀大街紫郡长安F3

Sitemap 网站地图 手机版

服务热线:15229292610

客服信箱:vip@dianmo.cc

846461336327

版权所有:西安点墨网络科技有限公司 信息备案编号: 陕ICP备11004160号-1