我敢刘若英演唱会歌单:asp中now()取得时间的问题

来源:百度文库 编辑:高校问答 时间:2024/05/03 01:15:52
格式为2006-8-23 下午 03:21:27
多了个下午,怎么弄,我把区域选项里的时间格式设置正确了,也不行,
各位,程序是不能动的了,因为程序是加密的。只能从系统上下手。

如果你是在远程服务器上调试的话,那么就需要改变远程服务器的时间格式,如果只是想达到去掉“下午”两个字的目的的话,楼上的方法可以解决,再给你一个简单转换函数吧,这样不管系统设置如何,都会输出长日期类型。
'************************************************
'** 转换日期到长型(即:2000-01-01 12:00:00)
'************************************************
Private Function FormatDate(strDate)
FormatDate = Right(CStr("2000" & Year(strDate)),4) & _
"-" & Right(CStr("00" & Month(strDate)),2) & _
"-" & Right(CStr("00" & Day(strDate)),2) & _
" " & Right(CStr("00" & Hour(strDate)),2) & _
":" & Right(CStr("00" & Minute(strDate)),2) & _
":" & Right(CStr("00" & Second(strDate)),2)
End Function

只是想不输入“下午” 试试 :date(now) & time(now)