赛捷软件论坛's Archiver

lynn.yu 发表于 2019-4-26 11:23

[V11功能解说] Sage EM企业管理中的Timestamp$函数

[b]* 本文由赛捷软件(上海)有限公司翻译完成,未经授权不得转载。如需转载,请先联系相应版块的版主取得授权。[/b]



在Sage EM企业管理系统中,我们有timestamp$函数,它可以返回包含时间戳的字符串值,这个时间戳是自格林尼治时间1970年1月1日00:00以来经过的毫秒数。

timestamp$返回的是ASCII格式的时间戳。

[attach]4999[/attach]

下面是标准Sage EM企业管理提供的示例代码段

<<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>>

希望这对你有所帮助!

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.