ESQL/C Datetime conversions - PS (fwd)
Posted in 1996
> > > > A colleague is trying to read a datetime and then use some esql/c function > > (cvt_datetime()???) to convert that given a mask. Does anyone have some > > examples of this sort of thing they could forward? Essentially the > > functionality required is the ability to handle ANY datetime (or interval) > > and an associate mask - so foo(CURRENT MONTH TO DAY,"MM-DD") would return > > 05-20 for today. > > > Hi , I have a function which accepts the datetime (year to seconds) ,mask and the format . cnvt(YEAR_TO_MONTH,"yyyy/mm",date); And it returns in the given format . If u are really interested ,drop a mail . I will forward the code .. e.g : cnvt(YEAR_TO_HOUR,"dd-mm-yyyy hh","1996-05-23 09:30:20") returns 23-05-1996 09 Bye. Peter. mpeter.muc@sni.de