SQL Command Not Returning Results in Calculated Field
Posted: 2021-08-28 15:46
Hello,
I am running successfully to run the following SELECT command to calculate the days and hours by calculating the difference between to DateTime fields using PHPmyadmin BUT when I use the same on AppGini it does not return any result!!!
What am I missing ?
SELECT
Start_DateTime, End_DateTime,
CONCAT(
TIMESTAMPDIFF(Day, Start_DateTime, End_DateTime),'d ',
LPAD(MOD(TIMESTAMPDIFF(Hour, Start_DateTime, End_DateTime), 24), 2, '0'), 'h'
)
AS DaysHours
FROM DailyTasks
WHERE DailyTasks.id = '%ID%'
I am running successfully to run the following SELECT command to calculate the days and hours by calculating the difference between to DateTime fields using PHPmyadmin BUT when I use the same on AppGini it does not return any result!!!
What am I missing ?
SELECT
Start_DateTime, End_DateTime,
CONCAT(
TIMESTAMPDIFF(Day, Start_DateTime, End_DateTime),'d ',
LPAD(MOD(TIMESTAMPDIFF(Hour, Start_DateTime, End_DateTime), 24), 2, '0'), 'h'
)
AS DaysHours
FROM DailyTasks
WHERE DailyTasks.id = '%ID%'