Query to show Timesheet details

Query to show Timesheet details

MSSQL:

select ts.id "TimeSheet ID", sdu.firstname "Technician Name", LONGTODATE(ts.starttime) "Timesheet Start Date", LONGTODATE(ts.endtime) "Timesheet End Date", CONVERT(varchar, ((ts.totaltime)/1000) / 3600) + ':' + RIGHT('0' + CONVERT(varchar,((ts.totaltime)/1000) % 3600 / 60), 2) + ':' + RIGHT('0' + CONVERT(varchar, ((ts.totaltime)/1000) % 60), 2)  
 "Total Time Spent", tsd.name "Approve Timesheet Status" from Timesheet ts LEFT JOIN  timesheetstatusdefinition tsd ON ts.statusid=tsd.id LEFT JOIN SDUser sdu ON ts.technicianid=sdu.userid

PGSQL:
‚Äč
select ts.id "TimeSheet ID", sdu.firstname "Technician Name", LONGTODATE(ts.starttime) "Timesheet Start Date", LONGTODATE(ts.endtime) "Timesheet End Date",cast((ts.Totaltime)/1000 * '1 second'::interval as varchar) "Total Time Spent", tsd.name "Approve Timesheet Status" from Timesheet ts LEFT JOIN  timesheetstatusdefinition tsd ON ts.statusid=tsd.id LEFT JOIN SDUser sdu ON ts.technicianid=sdu.userid

      • Related Articles

      • Contract and Service Plans details - Query Report

        PGSQL & MSSQL: select ac.contractno "Contract Number", ac.contractname "Contract Name", sp.serviceplanname "Service Plan Name",sp.plantype "Service Plan Type", sp.timeperiod "Bill Cycle",fixedmonthlycharges "Fixed Base Charge",sp.fixedmonthlyunits ...
      • Steps to Change Report Owner

        Kindly follow the below instruction to change the report owner. ( From Tech A  to Tech B) Query to get Technician User ID:     SELECT * FROM AAAUSER WHERE FIRST_NAME LIKE '%TECH NAME%'; You may replace the Tech A name and Tech B name to get the user ...
      • Query to show asset monitor details

        SELECT si.workstationname "Asset Name", si.workstationname  "Asset Name", mi.monitortype "Monitor Type", mi.serialnumber "Monitor Serial Number" from systeminfo si LEFT JOIN monitorinfo mi ON si.workstationid=mi.workstationid ORDER BY 1
      • Query to show account additional fields _ Details required

        We Need to know whether that is a common account additional fields or add attribute under individual account.   So please send us the following screenshots.   1. Admin-> Account additional fields list view page.   2. Accounts->Edit account and show ...
      • Query to show purchase order full details

        PGSQL: SELECT po.POCUSTOMID AS "Order No.",poi.serialno "S.No", poaddfield.UDF_CHAR1 AS "Legal Entity", po.PONAME AS "PO Name", pos.STATUSNAME AS "PO Status", cy.currencyname "Currency",  paao.NAME AS "Vendor Name", po.SHIPTO AS "Ship To", po.BILLTO ...