Time Stamps for mdl_role_assigments DB table

Time Stamps for mdl_role_assigments DB table

by Mario Cueva -
Number of replies: 4

Hi all, this is my first post and i am a complete noob to Moodle, so apologies upfront for all the stupid questions i'll be asking over time. fortunately i only have one stupid question to ask today smile

We have installed moodle on our server under SQL2005.  I am trying to figure out what format the value of the table mdl_role_assignments timestart timeend timemodified, which at the moment they read a little like this:

timestart      |   timeend     | timemodified

1256475600     1257339600    1256536109

1256562000     1257598800    1256598564

through a script that i am writing in .vbs i want to enter dates into these fields, but i can't figure out what format these time stamps are in. ie, what date/time is 1256598564 ??? i've had a long look through the forums here and i can't find the answer.

Also, if anyone could give me a leg up on a SQL Query string for displaying the formatted date stamp for the above time stamps that would be awesome.

Thanks in advance

Average of ratings: -
In reply to Mario Cueva

Re: Time Stamps for mdl_role_assigments DB table

by James McLean -
They're UNIX Timestamps, IE Seconds since 00:00:00 01/01/1970.

Sorry, I have no idea if MS SQL has functions for handling timestamps from the UNIX world..
In reply to James McLean

Re: Time Stamps for mdl_role_assigments DB table

by Mario Cueva -

aha!.. thanks for that.. i wouldn't have guessed unix time stamp.. i'll find a formula for convertion and i'll script it into my code.  thanks heaps James, this one was doing my head inn.

cheers