A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

To: Allen Browne changing date format in query



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 05:56 PM
external usenet poster
 
Posts: n/a
Default To: Allen Browne changing date format in query

Hi Allen. Thanks for your help.
In my query, I want to search between two date fields that
are formatted dd/mm/yyyy using the date field that is
formatted yyyymm.
I know that I have to tell Access to use the month and
year from yyyymm and add in 01 for the day but I don't
know how. Can you enlighten me?



  #2  
Old May 25th, 2004, 06:00 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default Allen Browne changing date format in query

Internally, Access stores Date/Time fields as a numeric value, where the
integer part represents the date, and the fraction part the time of day
(e.g. 0.5 = half a day (noon), 0.25 = quarter of a day (6am)).

Ultimately, therefore it does not matter how you display the date. What does
matter is that you use the correct format for literal dates in SQL strings,
and that Access understands what you intend for unbound controls and
calculated fields. More information:
http://allenbrowne.com/ser-36.html

If you are using text fields to store you dates, all bets are off.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

wrote in message
...
Hi Allen. Thanks for your help.
In my query, I want to search between two date fields that
are formatted dd/mm/yyyy using the date field that is
formatted yyyymm.
I know that I have to tell Access to use the month and
year from yyyymm and add in 01 for the day but I don't
know how. Can you enlighten me?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.