face to face query.. NEED HELP

face to face query.. NEED HELP

by rupamoy bhattacharya -
Number of replies: 2

Hi,

 

I need to fetch a report where face to face session start and end time is required. I'm using the following query but output date and time is not matching with Moodle generated report or Moodle GUI .

 

Is there anyone to help me out regarding this issue. Plz help, it's quite urgent.

Query :

 

SELECT c.id AS CourseId, c.fullname AS Course,f.id AS Sessionid,f.name AS SessionName,FROM_UNIXTIME(s.timestart) AS START,
FROM_UNIXTIME(s.timefinish) AS Finish FROM mdl_course c INNER JOIN mdl_facetoface f ON c.id=f.course INNER JOIN
mdl_facetoface_sessions_dates s ON f.id=s.sessionid ORDER BY FROM_UNIXTIME(s.timestart) ASC

 

Thanks in advance.

regards,

Rupamoy Bhattacharya

 

Average of ratings: -
In reply to rupamoy bhattacharya

Re: face to face query.. NEED HELP

by rupamoy bhattacharya -

Hi,

 

Still waiting for your suggestions.

 

Regards,

Rupamoy Bhattacharya

In reply to rupamoy bhattacharya

Re: face to face query.. NEED HELP

by Randy Thornton -
Picture of Documentation writers

Moodle reports & GUI will show the date and time adjusted to the Timezone setting you have in your profile (which may or may be the same as the site timezone settings.)

The database timestamps may very well be different, and are probably either UTC or server time. Try converting the times from the two sources to the same format and compare the difference to find the offset.