[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua how to get current and previous day
- From: soly man <luascript2010@...>
- Date: Tue, 14 Sep 2010 11:30:53 +0200
Dear friends
I have the following lua code and i want to get the current day and
the previous day
---------------------------------------------------------------------------------
--get the system current date
dd = os.date('%Y%m%d')
print (dd)
--get the system previous date
kk = dd - 1
print (kk)
--------------------------------------------------------------------------------------
the output looks like
--20100901
--20100900
but it should look like
--20100901
--20100831
plz help me to solve this problem
thank you all