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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|