日期:2014-05-17  浏览次数:20795 次

怎么样取070725这样形式的日期
年只取两位月日不满两位的补0

------解决方案--------------------
times= " "
years = Right(DatePart( "YYYY ",date),2)
months= datepart(d,now)
days= datepart(m,now)
if(months <10) then
months = "0 " & mintue
end if
if(days <10) then
days = "0 " & seconds
end if
times = years&mintue&seconds

大概是这样,我都忘了,反正 年 的取法是这样的,月和日的取法,你取出当前日期然后判断他小不小于10就行了
------解决方案--------------------
<%
'格式化日期
Function Formatdate(thedate)
dYear = Year(thedate)
dMonth = Month(thedate)
dDay = Day(thedate)
Formatdate = Right(dYear,2)&Right( "0 "&dMonth, "2 ")&Right( "0 "&dDay, "2 ")
End Function
%>

------解决方案--------------------
http://community.csdn.net/Expert/topic/5301/5301395.xml?temp=.2624475

调用:
Response.Write TimeFormat(Now(), "ymd ")