asp轉為即個位數補零,asp 2008 1 1 轉為 2008 01 01 即個位數補零

2022-08-15 09:45:04 字數 1749 閱讀 7252

1樓:百麗佳人

public function formatdate(dateandtime, para)

on error resume next

dim y, m, d, h, mi, s, strdatetime

formatdate = dateandtime

if not isnumeric(para) then exit function

if not isdate(dateandtime) then exit function

y = mid(cstr(year(dateandtime)),3)

m = cstr(month(dateandtime))

if len(m) = 1 then m = "0" & m

d = cstr(day(dateandtime))

if len(d) = 1 then d = "0" & d

h = cstr(hour(dateandtime))

if len(h) = 1 then h = "0" & h

mi = cstr(minute(dateandtime))

if len(mi) = 1 then mi = "0" & mi

s = cstr(second(dateandtime))

if len(s) = 1 then s = "0" & s

select case para

case "1"

strdatetime = y & "-" & m & "-" & d & " " & h & ":" & mi & ":" & s

case "2"

strdatetime = y & "-" & m & "-" & d

case "3"

strdatetime = y & "/" & m & "/" & d

case "4"

strdatetime = y & "年" & m & "月" & d & "日"

case "5"

strdatetime = m & "-" & d

case "6"

strdatetime = m & "/" & d

case "7"

strdatetime = m & "月" & d & "日"

case "8"

strdatetime = y & "年" & m & "月"

case "9"

strdatetime = y & "-" & m

case "10"

strdatetime = y & "/" & m

case "11"

strdatetime = y & "年" & m & "月" & d & "日 "& h & ":" & mi & ":" & s

case else

strdatetime = dateandtime

end select

formatdate = strdatetime

end function

2樓:匿名使用者

<%response.write formatdate( "2008-3-1 ")

end function

%>

有兩位數,個位數字是十位數字的3倍,將個位數字與十位數字調換,得到新的兩位數,這兩個兩位數的和是

解 設十位數字是x,個位數字是3x。方程 10x 3x 10 3x x 13213x 31x 132 44x 132 x 3十位是3,個位是3x 3 3 9 所以原來兩位數是39 求採納!謝謝!首先設這個兩位數個位上是x,十位上是y,因此x 3y 個位數與十位數對調,所以得到的新的兩位數個位是y,十...

excel個位數取整數入百,excel個位數取整數入百

上面的 2個情況中,資料都沒有小數,都是以千為單位,可以看看這個公式,1 資料在a1 1201,a2 1222,叫做向上取整在b1輸入公式 roundup a1 100,0 100,然後往下拖拉填充公式。如圖 2 資料在a3 1201,a4 1222,叫做 取整,在b3輸入公式 int a3 100...

數學考個位數就是RUO智麼

那個老師這麼sb250呀?那不是智商問題,你要是考了各位數,所能證明的只是老師沒實力,沒能把你教好.還有答數學就算你什麼都不會,把選擇題全選同一個答案,正確率也會不少的.內.我就是數學好的狠.英語都不提了.嘿 只是沒有入門而已.再加上內麼一個250老師.我看你數學好不了了.就討厭這樣的老師.我初2班...