; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ; ; STR_TO_ISO_DATIM : convert string date and time as: '2001-03-21/10:35:22.156' ; in date-time in ISO format, as : '2001-03-21T10:35:22.156Z' ; ; P. Robert, CETP, September 2006 ; ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ; ; ; FUNCTION: ; STR_TO_ISO_DATIM ; ; DESCRIPTION: ; function to transform a date-time string provided, for example, ; by TIME_TO_STR function, as '2001-03-21/10:35:22.156', in the date-time ; ISO format '2001-03-21T10:35:22.156Z' ; ; CALLING SEQUENCE: ; STR_TO_ISO_DATIM, str_datim ; ; INPUTS: ; str_datim : string date and time, as '2001-03-21/10:35:22.156' ; '/' character is mandatory; decimal second are not. ; ; OUTPUTS: ; string ISO_datim, as: '2001-03-21T10:35:22.156Z' ; ; MODIFICATION HISTORY: ; Written by : Patrick ROBERT, CETP ; Sept 20, 2006 : Version 1.0 ; ; NOTES: ; This function is used by the SCMWB calibration procedure ; which require date-time ISO format into the input N1 data file, ; and provides N2 file with this convention. ; ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX FUNCTION str_to_iso_datim, str_datim ; replace '/' by 'T' and add 'Z' at the end clean_datim= STRTRIM(str_datim,2) pos= STRPOS(clean_datim,'/') len= STRLEN(clean_datim) str_beg= STRMID(clean_datim,0,pos) str_end= STRMID(clean_datim,pos+1,len-pos-1) datim_iso= str_beg +'T' +str_end +'Z' RETURN, datim_iso END ; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX