Default Value field in a table formatted to Date

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Default Value field in a table formatted to Date

DAB DAB
Hi, I am new to openoffice and have used MS Access in the past. I have created a table called Customers and have 3 fields CustomerID, Name and Date. The date field type is date. When I open the table I want the Date field to default to today’s date so I don’t have to keep inputting a date.

What is the best way to do this in openoffice?

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Reply | Threaded
Open this post in threaded view
|

Re: Default Value field in a table formatted to Date

Joost Andrae-2
Hi,

I'm not quite sure what you like to accomplish.
Within Calc you can use the formula TODAY()

So if you enter =today() into a cell you'll get the current date.
If you save this within a spreadsheet document and if you load that
document then this cell will show you the current date.

Kind regards, Joost

Am 12.11.2020 um 09:04 schrieb DAB DAB:
> Hi, I am new to openoffice and have used MS Access in the past. I have created a table called Customers and have 3 fields CustomerID, Name and Date. The date field type is date. When I open the table I want the Date field to default to today’s date so I don’t have to keep inputting a date.
>
> What is the best way to do this in openoffice?
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Default Value field in a table formatted to Date

Alan Pearce-2
In reply to this post by DAB DAB
But it will change every time you open the spreadsheet which isn't what I thought you wanted. It is probably something that can be achieved but others more knowledgable than me will know.
   
Alan

-------- Original message --------
From: Joost Andrae <[hidden email]>
Date: 12/11/2020  11:37  (GMT+00:00)
To: [hidden email]
Subject: Re: Default Value field in a table formatted to Date

Hi,I'm not quite sure what you like to accomplish.Within Calc you can use the formula TODAY()So if you enter =today() into a cell you'll get the current date.If you save this within a spreadsheet document and if you load that document then this cell will show you the current date.Kind regards, JoostAm 12.11.2020 um 09:04 schrieb DAB DAB:> Hi, I am new to openoffice and have used MS Access in the past. I have created a table called Customers and have 3 fields CustomerID, Name and Date. The date field type is date. When I open the table I want the Date field to default to today’s date so I don’t have to keep inputting a date.> > What is the best way to do this in openoffice?> > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10> > ---------------------------------------------------------------------To unsubscribe, e-mail: [hidden email] additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Default Value field in a table formatted to Date

Dan Lewis
Try this: Control + ; (or Insert > Date)

This will insert the date in whatever format you select. Note: this is
not a function such as NOW() or TODAY().

Dan

On 11/12/20 18:40, Alan Pearce wrote:

> But it will change every time you open the spreadsheet which isn't what I thought you wanted. It is probably something that can be achieved but others more knowledgable than me will know.
>      
> Alan
>
> -------- Original message --------
> From: Joost Andrae <[hidden email]>
> Date: 12/11/2020  11:37  (GMT+00:00)
> To: [hidden email]
> Subject: Re: Default Value field in a table formatted to Date
>
> Hi,I'm not quite sure what you like to accomplish.Within Calc you can use the formula TODAY()So if you enter =today() into a cell you'll get the current date.If you save this within a spreadsheet document and if you load that document then this cell will show you the current date.Kind regards, JoostAm 12.11.2020 um 09:04 schrieb DAB DAB:> Hi, I am new to openoffice and have used MS Access in the past. I have created a table called Customers and have 3 fields CustomerID, Name and Date. The date field type is date. When I open the table I want the Date field to default to today’s date so I don’t have to keep inputting a date.> > What is the best way to do this in openoffice?> > Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10> > ---------------------------------------------------------------------To unsubscribe, e-mail: [hidden email] additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Default Value field in a table formatted to Date

Dick Groskamp-4
In reply to this post by DAB DAB
For Base:

In dialog Execute SQL:

ALTER TABLE "Customers" ALTER COLUMN "Date" DATE DEFAULT CURRENT_DATE;   //full declaration with type and default

OR

ALTER TABLE "Customers" ALTER COLUMN "Date" SET DEFAULT CURRENT_DATE; // modify the default only


On 2020/11/12 08:04:03, DAB DAB <[hidden email]> wrote:
> Hi, I am new to openoffice and have used MS Access in the past. I have created a table called Customers and have 3 fields CustomerID, Name and Date. The date field type is date. When I open the table I want the Date field to default to today’s date so I don’t have to keep inputting a date.
>
> What is the best way to do this in openoffice?
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]