Date Format
-
- NewLounger
- Posts: 20
- Joined: 26 Jul 2011, 14:08
Date Format
I have a shared database to track current employees, which uses multiple date fields formated as short dates, 04-Jul-14 . On my computer I created a query to search specifice date fields using the 'Jul' parameter. It works just fine on my computer and shows the records I am looking for. However on another persons computer, the query comes up null because it shows all the dates 04-07-14. How do I correct this so anyone with access to the database can pull of the established queries?
-
- Administrator
- Posts: 78443
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Date Format
In the query, create calculated columns like this:
Month1: Month([DateField1])
Clear the Show check box for these columns, and enter the month number to filter on in the Criteria row. For example, for July, enter 7.
Month1: Month([DateField1])
Clear the Show check box for these columns, and enter the month number to filter on in the Criteria row. For example, for July, enter 7.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 20
- Joined: 26 Jul 2011, 14:08
Re: Date Format
I tried that but then the reverse happens and nothing will show on the computer(s) that show the date as 04-Jul-14. I've tried setting the field as a date/time and selecting the short date format, but it still shows differently on the different computers that are acessing the file.
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Date Format
Are you sure the field (in the source table) is a date/time type? It sound more like it is stored as a string, else Hans's criteria would work.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 78443
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Date Format
But if the dates are stored as strings, they wouldn't be displayed as 04-Jul-14 on mouisset1's computer and as 04-07-14 on someone else's PC...
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Date Format
True...HansV wrote:But if the dates are stored as strings, they wouldn't be displayed as 04-Jul-14 on mouisset1's computer and as 04-07-14 on someone else's PC...
[/size]
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- NewLounger
- Posts: 20
- Joined: 26 Jul 2011, 14:08
Re: Date Format
my brain finally kicked in -- I changed the field to 'text' and then set the format to short date and it works on the different computers. THANK YOU!!!!
-
- Administrator
- Posts: 78443
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Date Format
I'm not sure that's a good idea - it will be more difficult to perform date calculations. But if it works for you - fine!
Best wishes,
Hans
Hans