dbdate
Posted in 2009
Topics: General Discussion
v11.50.fc4 ... does there exist a set command for dbdate ... I got a developer who wants to set that prior to doing some things in a stored procedure ... doesn't want to do it at the unix level ... looking for something like ... set dbdate to y4md0; Peter Logan Senior Database Administrator Phone: 616/878-8309
Can't be done. Art Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Thu, Sep 3, 2009 at 2:11 PM, Peter_Logan@spartanstores.com < Peter_Logan@spartanstores.com> wrote: > v11.50.fc4 ... does there exist a set command for dbdate ... I got a > developer who wants to set that prior to doing some things in a stored > procedure ... doesn't want to do it at the unix level ... looking for > something like ... > > set dbdate to y4md0; > > Peter Logan > Senior Database Administrator > Phone: 616/878-8309 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --00151747906e34fd680472b24316
On Thu, Sep 3, 2009 at 11:11, Peter_Logan@spartanstores.com<Peter_Logan@spartanstores.com> wrote: > v11.50.fc4 ... does there exist a set command for dbdate ... I got a > developer who wants to set that prior to doing some things in a stored > procedure ... doesn't want to do it at the unix level ... looking for > something like ... > > set dbdate to y4md0; As Art said, it can't be done. The workaround is to be careful with date manipulation. There isn't much that you can't do with a judicious combination of the YEAR(), MONTH(), DAY() and MDY() functions, possibly combined with some multiplication, addition, or casting. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even. Marie von Ebner-Eschenbach - "Even a stopped clock is right twice a day." - http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html