[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Convert date format
- From: "marcoswur@yahoo" <marcoswur@...>
- Date: Fri, 31 May 2002 17:40:04 +0000
Hi,
I use LuaSQL to query a database.
In case that the field is in date format, it return a string '2002-10-10
00:00:00'.
I want to change the format for '10/10/02'.
I can use strfind and strsub.
The date() function could receive this string as parameter?
It would be the ideal.
a = date('%d/%m/%y ', ' 2002-10-10 00:00:00 ')
print(a) - > 10/10/02
What is the best way to make this conversion?
Or I can format LuaSQL to return the date in the desired format?
Thanks
--
Marcos E. Wurzius