FOR x=1 TO 10 >> INKEY(0.001) >> ?ttocEXT(DATETIME()) >>ENDFOR>
>? ttocExt(DatetimeExt()) > >FUNCTION DatetimeExt > RETURN DATETIME()+VAL(RIGHT(TIME(1),2))*0.01 > >function ttocExt >* ttoc replacement to include milliseconds >LPARAMETERS ptDateTime >lnMilli=ROUND((ptDateTime-DATETIME(YEAR(ptDateTime),MONTH(ptDateTime),DAY(ptDateTime),hour(ptDateTime),MINUTE(ptDateTime),SEC(ptDateTime)))*1000,0) >IF lnMilli<0 > ptDatetime = ptDatetime + 1 > lnMilli=lnMilli+1000 >ENDIF >RETURN TTOC(ptDateTime)+'.'+PADL(lnMilli,3,'0') > >Sounds reasonable to me. But I thought that DATETIME() did return a millisecond value, you just didn't see it, and that's what would cause problems in trying to do a SELECT for a specific datetime type value.