Forums

ASP

This topic is locked

convert the time 1500 to 3:00

Posted 11 May 2007 13:00:22
1
has voted
11 May 2007 13:00:22 Zizo Alshabrawi posted:
<font face='Verdana'>Dear all
if you can help me to convert 1500 to 3:00 as time
thanks in advance</font id='Verdana'>

Replies

Replied 11 May 2007 18:13:33
11 May 2007 18:13:33 Alan C replied:
depends very much on how the time is stored and where you got it from - I would look at the code that presents it first to see if there is a formatting string that formats it as 24 hour, if that's not there then you can extract the hours part, test to see if it's greater than 12 and if it is subtract 12 then re-store it back where you got it from.

Replied 12 May 2007 23:59:09
12 May 2007 23:59:09 Zizo Alshabrawi replied:
Thank you very much for your help this time is storing in Informix database in same format for example 1200 ,1300,1400,1500,1600,1700 and so on
I retrieved this data from the database as SmallInt but i want show it for the user as 12:00, 1:00,2:00 .....
Also I have in the same database another time storing as Integer for example
Login time - Logout time
1178554300 - 1178554324
1178524399 - 1178554424
1178524403 - 1178532556
If you have any idea to show it as time as you see its login and logout time
thank you again for your support.

Reply to this topic