If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to set default date format in Access 07
I have an Access form that my users enter new customers into and it
automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#2
|
|||
|
|||
How to set default date format in Access 07
use Date()
Date() includes only the date Now() includes date and time And, would you believe Time() returns only the time -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#3
|
|||
|
|||
How to set default date format in Access 07
Use the Date function instead.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Nih" wrote in message ... I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#4
|
|||
|
|||
How to set default date format in Access 07
On Thu, 20 Mar 2008 09:27:00 -0700, Nih wrote:
I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work What "didn't work"? Now() does in fact return the date and time; that's what it's FOR. Date() returns the current date. Please explain how you tried to use Date() and what errors you got. Do note that you can get strange results if you have a Field or form control named Date, since Access can get confused about which Date you mean. -- John W. Vinson [MVP] |
#5
|
|||
|
|||
How to set default date format in Access 07
"Nih" wrote in message
... I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work Setting the format in the form to =Date() works fine in my database. What didn't work when you tried it? Julie |
#6
|
|||
|
|||
How to set default date format in Access 07
I tried Date() before but Access gave me an error. I will check the error when I get back to work and post exactly what it says. This is Access 07, is Date() no longer valid on that version? "Klatuu" wrote: use Date() Date() includes only the date Now() includes date and time And, would you believe Time() returns only the time -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#7
|
|||
|
|||
How to set default date format in Access 07
It is valid.
What error did your get? Where did you get it? Do you have any field, control, form, report or anything in your database named Date? More info gets better answers. -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I tried Date() before but Access gave me an error. I will check the error when I get back to work and post exactly what it says. This is Access 07, is Date() no longer valid on that version? "Klatuu" wrote: use Date() Date() includes only the date Now() includes date and time And, would you believe Time() returns only the time -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#8
|
|||
|
|||
How to set default date format in Access 07
You need to type Date() next to Default Value in your *Table's* Design View.
Is that what you did? The last time Date() didn't work for me, it was when I had some missing References. Open a Module (a blank new one will do), go to Tools, References and tell us which items are ticked. There may be something absent there. Are any of them marked as MISSING? Evi "Nih" wrote in message ... I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#9
|
|||
|
|||
How to set default date format in Access 07
It is a very small database with 1 form and this form does not have a "date"
field on it. The only table in it does have a field called "date" which is the field I want Access to autofill with today's date. I go to the design view of the table and click on date, in the default value field I typed in Date (), Date(), =Date(0, etc and every time I try to save the table i get "unknown function 'date' ini validation expression or default value on 'Active.Customers.date". "Klatuu" wrote: It is valid. What error did your get? Where did you get it? Do you have any field, control, form, report or anything in your database named Date? More info gets better answers. -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I tried Date() before but Access gave me an error. I will check the error when I get back to work and post exactly what it says. This is Access 07, is Date() no longer valid on that version? "Klatuu" wrote: use Date() Date() includes only the date Now() includes date and time And, would you believe Time() returns only the time -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
#10
|
|||
|
|||
How to set default date format in Access 07
I also changed the date field's name to "customer date" to see if that fixed
it...it didn't "Nih" wrote: It is a very small database with 1 form and this form does not have a "date" field on it. The only table in it does have a field called "date" which is the field I want Access to autofill with today's date. I go to the design view of the table and click on date, in the default value field I typed in Date (), Date(), =Date(0, etc and every time I try to save the table i get "unknown function 'date' ini validation expression or default value on 'Active.Customers.date". "Klatuu" wrote: It is valid. What error did your get? Where did you get it? Do you have any field, control, form, report or anything in your database named Date? More info gets better answers. -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I tried Date() before but Access gave me an error. I will check the error when I get back to work and post exactly what it says. This is Access 07, is Date() no longer valid on that version? "Klatuu" wrote: use Date() Date() includes only the date Now() includes date and time And, would you believe Time() returns only the time -- Dave Hargis, Microsoft Access MVP "Nih" wrote: I have an Access form that my users enter new customers into and it automatically generates the date by using the Now() function, the problem is the date that it auto inserts has the time after it, for instance 3/20/2008 8:35AM. How do I get this to only show the date ie 3/20/2008 and cut the timestamp off? I have tried filters on the date field but they do not work, is Now() set up to always include the time, if so what would be a better function to just insert today's date? I tried Date() but that didn't work |
Thread Tools | |
Display Modes | |
|
|