Time variables in Progress
23 April, 2013
Hallo
When saving a TIME value in progress, it is saved as an INTEGER that represents the milliseconds after midnight.
So for example
14:03:55 is saved as 50635
11:06:40 is saved as 40000
in yellowfin I can convert a java integer to time , it is similar but it is milliseconds after a certain date (January 1, 1970, GMT).
If I now convert 50635 I get 02:00:50 and 40000 gives 02:00:40.
Is there a way of converting my progress TIME ?
If not will you consider adding a conversion for Progress TIME ?
Thank you
A Venter
When saving a TIME value in progress, it is saved as an INTEGER that represents the milliseconds after midnight.
So for example
14:03:55 is saved as 50635
11:06:40 is saved as 40000
in yellowfin I can convert a java integer to time , it is similar but it is milliseconds after a certain date (January 1, 1970, GMT).
If I now convert 50635 I get 02:00:50 and 40000 gives 02:00:40.
Is there a way of converting my progress TIME ?
If not will you consider adding a conversion for Progress TIME ?
Thank you
A Venter
Hi Abri,
you could try converting it by using a Freehand SQL Calculated field in the View Builder as mentioned in this forum post.
I hope that does the job, please let us know how it goes.
Regards,
Dave
you could try converting it by using a Freehand SQL Calculated field in the View Builder as mentioned in this forum post.
I hope that does the job, please let us know how it goes.
Regards,
Dave
Hallo
Yes , I am aware of the Freehand SQL fields , I have used the following
FLOOR(AgeTime / 60 / 60) to give the hours
FLOOR((AgeTime - FLOOR(AgeTime / 60 / 60) * 60 * 60) / 60) for minutes
FLOOR(AgeTime - (FLOOR(AgeTime / 60) * 60)) for seconds.
Adding 3 fields and then having the int values on my report.
So for 50635 I get 14 , 03 , 55
But when I add another field and enter
CAST(FLOOR(AgeTime / 60 / 60) AS VARCHAR) + ':' +
CAST(FLOOR((AgeTime - FLOOR(AgeTime / 60 / 60) * 60 * 60) / 60) AS VARCHAR) + ':' +
CAST(FLOOR(AgeTime - (FLOOR(AgeTime / 60) * 60)) AS VARCHAR)
as the SQL
I do not get 14:03:55. It returns 5:3
I have no idea why this would happen, and as I cannot do concatenations on my reports I still do not have a single field that represents the TIME.
Thank you
A Venter
Yes , I am aware of the Freehand SQL fields , I have used the following
FLOOR(AgeTime / 60 / 60) to give the hours
FLOOR((AgeTime - FLOOR(AgeTime / 60 / 60) * 60 * 60) / 60) for minutes
FLOOR(AgeTime - (FLOOR(AgeTime / 60) * 60)) for seconds.
Adding 3 fields and then having the int values on my report.
So for 50635 I get 14 , 03 , 55
But when I add another field and enter
CAST(FLOOR(AgeTime / 60 / 60) AS VARCHAR) + ':' +
CAST(FLOOR((AgeTime - FLOOR(AgeTime / 60 / 60) * 60 * 60) / 60) AS VARCHAR) + ':' +
CAST(FLOOR(AgeTime - (FLOOR(AgeTime / 60) * 60)) AS VARCHAR)
as the SQL
I do not get 14:03:55. It returns 5:3
I have no idea why this would happen, and as I cannot do concatenations on my reports I still do not have a single field that represents the TIME.
Thank you
A Venter
Hallo
This works if you format it as TIME H:mm:ss
TIMESTAMPADD(SQL_TSI_SECOND,AgeTime,CURDATE())
Thank you
A Venter
This works if you format it as TIME H:mm:ss
TIMESTAMPADD(SQL_TSI_SECOND,AgeTime,CURDATE())
Thank you
A Venter