FMT D DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords++++++++++
*************** Beginning of data **********************
0001.00 D Date8 S 10 inz('03/04/2013')
0002.00 D Time6 S 6P 0 inz(182403)
0003.00 D D8 S D
0004.00 D T6 S T
0005.00
0006.00 /free
0007.00 Eval D8 = %Date(Date8:*USA);
0008.00 Eval T6 = %Time(Time6:*HMS);
0009.00 Dsply ('D8= '+%Char(D8));
0010.00 Dsply ('T6= '+%Char(T6));
0011.00
0012.00 D8= %Date(); //获取当前系统日期
0013.00 T6= %Time(); //获取当前系统时间
0014.00 Dsply ('Current Date is '+%Char(D8));
0015.00 Dsply ('Current Time is '+%Char(T6));
0016.00
0017.00 Eval *inlr=*on;
0018.00 Return;
0019.00 /end-free
在做日期 时间转换时, 要注意转换用的格式
具体要参考RPG reference