CLOSE TABLES ALL CLEAR CREATE TABLE dttable FREE (tt t) APPEND BLANK USE USE dttable shared #DEFINE ttposition 362 ? "Read write difference" ?? "Field julian day part" AT 30 ?? "Field date part" AT 60 ?? "Field time part" AT 80 TTREAD = DATETIME(2000,1,1,0,0,15) REPLACE tt WITH DATETIME(2000,1,1,0,0,15) * convert the TT into the float format = julianday.dayfraction FOR k=1 TO 5 FLUSH FORCE * read the field datetime TTRAW=SUBSTR(FILETOSTR(DBF()),ttposition,8) * print ? PADL((m.TTREAD - TT)*1.000000000000000,20) ?? CTOBIN(LEFT(m.TTRAW,4),"RS") AT 30 ?? SYS(10,CTOBIN(LEFT(m.TTRAW,4),"RS")) AT 60 ?? CTOBIN(RIGHT(m.TTRAW,4),"RS")*0.001 AT 80 * convert the field in floating point memory TTREAD = TT * rewrite the field change the value replace tt WITH tt NEXT USE ERASE dttable.dbf