This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How get the time correctly
#3
T=os.date()
t=os.date("%H:%M:%S")--时:分:秒
t1=os.date("%H:%M")--时:分
Y=os.date("%Y")--年
y=os.date("%y")--年缩写
m=os.date("%m")--月
W=os.date("%W")--当年第几周
w=os.date("%w")--周
D=os.date("%D")--几月几号几年
d=os.date("%d")--几号
grp.write('32/1/3', T)
grp.write('32/1/4', t)
grp.write('32/1/5', t1)
grp.write('32/1/6', Y)
grp.write('32/1/7', y)
grp.write('32/1/8', m)
grp.write('32/1/9', W)
grp.write('32/1/10', w)
grp.write('32/1/11', D)
grp.write('32/1/12', d)

you can try these
Reply


Messages In This Thread
RE: How get the time correctly - by FatMax - 25.09.2017, 16:01
RE: How get the time correctly - by stephen.song - 26.09.2017, 09:08

Forum Jump: