Moodle Date Format

Posted: July 10, 2012 in Uncategorized
Tags: , ,

For our Moodle site, I had to add custom user profile date field called starting date. I was using Moodle’s  upload user utility to load user data through csv file and it wouldn’t load the date correctly. After struggling for four days, I found out that Moodle loads date in unix time or epoch time. I used following formula to convert date in mm/dd/yyyy format to Moodle date format
Moodle date =((date -25569) * 86400) + 21600


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s