Date of created file

Creating tables and queries

Date of created file

Postby D Soyars » Sun Jun 30, 2019 4:26 pm

I am trying to "timestamp" just the date "current date" at the creation of a new file only
OpenOffice 4.1.5 on Windows 10
D Soyars
 
Posts: 6
Joined: Wed May 29, 2019 5:40 pm

Re: date of created file

Postby UnklDonald418 » Sun Jun 30, 2019 8:03 pm

A DateTime field is basically a tick counter. It is a floating point number with the number of days since December 31, 1899 to the left of the decimal point and the number of milliseconds since midnight to the right of the decimal point.
A Date control on a Base form has a number of formatting options that allow display of only the date portion of a timestamped DateTime field.

You can specify a CURRENT_DATE constraint then timestamp times will always be set to 0 (12:00 AM).
If your table already has a Date/Time field then modify the following SQL template
Code: Select all   Expand viewCollapse view
ALTER TABLE "YourTableName" ALTER COLUMN "ExistingDate/TimeColumn" SET DEFAULT CURRENT_DATE;

Be sure to keep a backup of your original table in case something goes awry. Execute the SQL statement at Tools>SQL, then select View>Refresh Tables to complete the update.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1321
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: date of created file

Postby UnklDonald418 » Sun Jun 30, 2019 8:48 pm

It just occurred to me that you could use the same SQL statement on a Date field. That would essentially result in a date stamp.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1321
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Date of created file

Postby D Soyars » Wed Jul 03, 2019 4:15 am

Thank you for your reply
I tried it and it wont work the whole program crashes
OpenOffice 4.1.5 on Windows 10
D Soyars
 
Posts: 6
Joined: Wed May 29, 2019 5:40 pm

Re: Date of created file

Postby UnklDonald418 » Wed Jul 03, 2019 5:37 pm

According to your signature you are using OO on a Windows 10 platform. If OO is frequently crashing then make sure you have all the latest Windows updates installed and it might be worthwhile to upgrade OO to version 4.1.6
On the Performance tab the Windows Task Manager (<Ctrl><Shift><Esc>) displays the resources monitor. Make sure you aren't running out of memory
If the problem persists the try Libre Office.
https://www.libreoffice.org/download/download
There is no immediate need to delete OO because OO and LO can both be installed on the same computer.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1321
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 2 guests