function day_date()
day_date=now()
day_date=replace(day_date,"-","")
day_date=replace(day_date,":","")
如果你想得到月日时分秒也全为双位数的格式的话,还要先格式一下,把月日时分秒不为两位数的前面补零
function dtos(num)
dtos=cstr(num)
if len(dtos)<2 then
for i=1 to 2-len(dtos)
dtos="0"&dtos
next
else
dtos=dtos
end if
dtos=cint(dtos)
end function
function day_date()
day_month=dtos(month(now))
day_day=dtos(day(now))
day_hour=dtos(hour(now))
day_minute=dtos(minute(now))
day_second=dtos(second(now))
day_date=cstr(year(now))&cstr(day_month)&cstr(day_day)&cstr(day_day)&cstr(day_hour)&cstr(day_minute)&cstr(day_second)
end function
day_date=now()
day_date=replace(day_date,"-","")
day_date=replace(day_date,":","")
day_date=replace(day_date," ","")
day_date=replace(day_date,"/","")
如果你想得到月日时分秒也全为双位数的格式的话,还要先格式一下,把月日时分秒不为两位数的前面补零
function dtos(num)
dtos=cstr(num)
if len(dtos)<2 then
for i=1 to 2-len(dtos)
dtos="0"&dtos
next
else
dtos=dtos
end if
dtos=cint(dtos)
end function
function day_date()
day_month=dtos(month(now))
day_day=dtos(day(now))
day_hour=dtos(hour(now))
day_minute=dtos(minute(now))
day_second=dtos(second(now))
day_date=cstr(year(now))&cstr(day_month)&cstr(day_day)&cstr(day_day)&cstr(day_hour)&cstr(day_minute)&cstr(day_second)
end function