-----Original Message----- >From: Dan Lewis <[EMAIL PROTECTED]> >Sent: Aug 8, 2006 12:01 PM >To: [email protected] >Subject: Re: [users] using OOo Base > >On Tuesday 08 August 2006 01:42 pm, James Mckenzie wrote: >> -----Original Message----- >> >> >From: Mc Fly <[EMAIL PROTECTED]> >> >Sent: Aug 7, 2006 10:02 PM >> >To: [email protected] >> >Subject: [users] using OOo Base >> > >> >Hello, >> >i´m using Openoffice since 2 weeks ist a realy good programm! >> >but now i´ve got a problem. >> >I have created a database with OOo Base and i want using SQL to >> > delete old data form the db >> > >> >DELETE FROM "Aufträge" WHERE "Liefertermin" < SYSDATE >> > >> >this command line works but i want to delete data where 14 days >> > older than the SYSDATE / NOW >> > >> >SYSDATE - 14 DAYS or SYSDATE - 14 DAY or SYSDATE - 14 >> >> Try SYSDATE - (14*86400). I don't know if the system date is >> stored in seconds or days, but this might help. >> >> James M. > > Dates are stored as decimals using days. For example, 12.7500000 >is 12 days and 18 hours.
Thank you for the update. I work with both Oracle and MS SQL which store dates in different formats and ordinary math is possible by subtracting $DATE$ and the number of days. SYSDATE may be in a different format than what we expect in Base. I will definately check this out and see what format it is given in. James M. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
