<<Code snippet>>
Local decimal D
Local Decimal T : # Cannot be an integer because timestamp value is greater the 2^32
Local Integer T1
Local Char MY_TIME(8)
T=val(timestamp$)
T1=mod(T,3600*24*1000)/1000 : # modulo the number of milliseconds in a day
MY_TIME=format$(“N0:2″,int(T1/3600))+”:”+format$(“N0:2″,int(mod(T1,3600)/60))+”:”+format$(“N0:2”,mod(T1,60))
# Now, MY_TIME contains the GMT hour in hh:mm:ss format
<</Code snippet>>