Re: datetime conversion help
Posted in 1998
roger.bruening@METROKC.GOV wrote: > <snip> > What I have tried: > This below works but it has a hard coded date.. So I need to substitute.. > > ....extend( Datetime(1998-09-03) year to day, year to minute) + interval (180) > minute (3) to minute from ... > > Below gives a syntax error. > > select extend( Datetime(current year to day - 1 units day) year to day, year > to minute) + interval (180) minute (3) to minute from csrtest > <snip> Roger, Why you plan to convert the datetime value from CURRENT to string and then call convert it back again to datetime, I think waht you should need is some thing like : select ((extend((current - 1 units day), year to minute)) + (interval (180) minute (3) to minute)) from systables where tabid = 5 Note: +/- units TYPE, could give you data-error if the unit-TYPE used is month or year ( bigger than day ), because of 28/29/30/31 days of months. -- Have a nice day Felix K. Mathews mailto:fmathews@systems.dhl.com