I have a date field on my form that I want to default to today’s date when doing data entry. I took three approaches when going at this but all were unsuccessful:
1. Tried changing the field in question at the form level by setting the “Default date” on the Properties pop-up menu (by right-clicking the field and selecting Control), but the little calendar that came up didn’t have a “Today” button on it like it does when actually running the form and doing data entry. So that method was a dead end.
2. Tried changing the Default Value at the Table Design level (near the bottom of the screen) to CURRENT_DATE. It seemed to like this okay but it didn’t “take” because when I came back to it later, it had disappeared. Strike two.
3. I ran the following command on the SQL screen: ALTER TABLE 'MyTbl' ALTER COLUMN 'MyDateFld' SET DEFAULT CURRENT_DATE. It also liked this okay because I got “command successfully executed” but when I went into my form the field there displayed the date “01/01/1800”. Not good.
So now I’m stumped. Any ideas?
- thx
References: libreoffice-users CURRENTDATE or TODAY default date in Base: John Mullen libreoffice-users Re: CURRENTDATE or TODAY default date in Base. Oct 11, 2016 CURRENTDATE or TODAY default date in Base. Hi Guys, I'm trying to set a default date ( CURRENTDATE or TODAY) ie, Todays date into a date field in a Base Form with. LibreOffice Base Tutorial #1 – Basic Functionality. Base is the database component of the free and open-source office suite LibreOffice, with this solid database.
1. Tried changing the field in question at the form level by setting the “Default date” on the Properties pop-up menu (by right-clicking the field and selecting Control), but the little calendar that came up didn’t have a “Today” button on it like it does when actually running the form and doing data entry. So that method was a dead end.
![Libreoffice base tutorial Libreoffice base tutorial](/uploads/1/2/6/4/126474995/534767601.jpg)
3. I ran the following command on the SQL screen: ALTER TABLE 'MyTbl' ALTER COLUMN 'MyDateFld' SET DEFAULT CURRENT_DATE. It also liked this okay because I got “command successfully executed” but when I went into my form the field there displayed the date “01/01/1800”. Not good.
So now I’m stumped. Any ideas?
![Date Date](http://4.bp.blogspot.com/-A_z48JaMVBs/T2bk7tu1EDI/AAAAAAAABic/D2GkfaaDzq8/s1600/LibreOffice%2Bin%2BSlackware.png)