[ncl-talk] unable to convert date and time
Geeta Geeta
geetag54 at yahoo.com
Thu Mar 19 03:46:03 MDT 2020
Hi
in my code, I have extracted the dats which looks like 20090402 (2nd April2009).I have to convert it to the format 02apr2009.
I am using cd_convert to write the date and time in the required format.
Following is the lines from the code. I have added units to this variable YYMMDD
YYMMDD = stringtointeger(Split_name(1)) ; string variable
print(YYMMDD)
YYMMDD at units = "days since 0000-01-01 00:00:0.0"
; printVarSummary(YYMMDD)
stime = cd_convert(YYMMDD,"%c%y")
; print(stime)
I get error like this
CDMS error: Error on relative units conversion: invalid units = %c%y
kindly suggest
Geeta.
More information about the ncl-talk
mailing list