Convert Date Format
- by Pankaj Khurana
Hi,
I have a moodle installation in which there is a column in mdl_user table called firstaccess whose type is bigint(10) and contains date in following format 1266839570.
I am writing a query for accessing users according to date filters. For e.g. i want to check which users firstaccess is greater than '2010-04-12'. How can i convert the date? These two date formats are different. I think firstaccess is unix timestamp. Should i change the '2010-04-12' into unix timestamp or there is a way to convert firstaccess i.e 1266839570 to yyyy-mm-dd format.
Please help me on this.
Thanks