Hi Thorkild, I've just tested this using the below code and the oasis montaj v5.1.1 (RW) compilers and I couldn't repeat your problems. They are not complicated functions so there is not much to explain, bar the fact that the input times and dates should be in decimal hours and years respectively.
string(STR_DEFAULT) sTime,sDate; { FormatTime_STR(12.21,sTime,12,2,TIME_FORMAT_COLON); DisplayMessage_SYS("HH:MM:SS.ss",sTime); FormatTime_STR(12.21,sTime,12,2,TIME_FORMAT_HMS); DisplayMessage_SYS("HHMMSSSS",sTime); FormatDate_STR(2001.234,sDate,12,DATE_FORMAT_YYYYMMDD); DisplayMessage_SYS("YYYYMMDD",sDate); FormatDate_STR(2001.234,sDate,12,DATE_FORMAT_DDMMYYYY); DisplayMessage_SYS("DDMMYYYY",sDate); } I hope this helps. ________________________ Geosoft Europe Ltd. Ben Spurgeon [EMAIL PROTECTED] Tel. +44 1491 835231 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] > Sent: Thursday, November 29, 2001 2:18 PM > To: [EMAIL PROTECTED] > Subject: [gxnet]: FormatTime_STR > > > Hi, > > Could someone explain the use of FormatTime_STR to me ?. I am trying to > convert the result of a call to rFileDate_SYS(sPathFile). When I use the > FORMAT_TIME_COLON , I get a result written as HH.MMSS (no colon here but > results are otherwise ok !) but when I try to use FORMAT_TIME_HHMMSS or > FORMAT_TIME_HMS in the call, I get a run time error "Invalid Time Format". > > Is this a bug ? > > I have similar problems when I use FORMAT_DATE_DDMMYYYY in FormatDate_STR > However, > FORMAT_DATE_YYYYMMDD works fine here. > > > Best regards > ThorkildThorkild M. Rasmussen > > Ph.D., senior research geophysicist > GEUS, Geological Survey of Denmark and Greenland > Thoravej 8 > DK-2400 Copenhagen NV > Denmark > > phone : (+45) 38 14 22 11 > fax : (+45) 38 14 22 20 > email : [EMAIL PROTECTED] > > // --- string formats --- > > #define FORMAT_DECIMAL 0 > #define FORMAT_SIG_DIG 5 > #define FORMAT_EXP 1 > #define FORMAT_TIME_COLON 2 > #define FORMAT_TIME_HMS 8 > #define FORMAT_TIME_HHMMSS 9 > #define FORMAT_DATE_YYYYMMDD 3 > #define FORMAT_DATE_DDMMYYYY 6 > #define FORMAT_DATE_MMDDYYYY 7 > _______________________________________________________ > More mailing list info http://www.geosoft.com/support/listserv/index.html > List Archive http://www.mail-archive.com/gxnet@lists.geosoft.com > _______________________________________________________ More mailing list info http://www.geosoft.com/support/listserv/index.html List Archive http://www.mail-archive.com/gxnet@lists.geosoft.com