473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

date problem in access

hi friends,

i am really surprized the way access behaves in date fields i mean
it's all ok when you have us time zone or us servers but if you have
diffrent timezone like uk then access creates so many problems ....

first of all i try access with uk settings in date/time in field but
access changes date after 09/11 to 11/09 i don't know why so i decided
to take it as text field steel it is creating problems

i have date field in my database

and when user selects two dates i need to find all the date between
those two dates.

currently i have assign text datatype for date field i am storing dates
in this field like

formatdatetime(date(),vbshortdate)

my server is uk based and here is it's date format:: dd-mm-yyyy

now when user searches two dates like 25/06/2006 and 10/09/2006 then
i am writing query like

start_date = formatdatetime("25/06/2006",vbshortdate)
end_date = formatdatetime("10/09/2006",vbshortdate)

"SELECT * FROM table WHERE datefield BETWEEN #"&start_date&"# AND
$"&end_date&""

but access is not searching and after searching diffrent dates i found
sometimes access searches month as day ,

so i change the date field's datatype in database but then when i try
it steel not run
i believe here lots of people experience and some may have feel this
problem plz tell me solution of problem or atleast give me hint of how
to do it.

thanx in advance

Nov 11 '06 #1
2 5130
See if this link helps: http://www.mvps.org/access/datetime/date0005.htm

hardik wrote:
>hi friends,

i am really surprized the way access behaves in date fields i mean
it's all ok when you have us time zone or us servers but if you have
diffrent timezone like uk then access creates so many problems ....

first of all i try access with uk settings in date/time in field but
access changes date after 09/11 to 11/09 i don't know why so i decided
to take it as text field steel it is creating problems

i have date field in my database

and when user selects two dates i need to find all the date between
those two dates.

currently i have assign text datatype for date field i am storing dates
in this field like

formatdatetime(date(),vbshortdate)

my server is uk based and here is it's date format:: dd-mm-yyyy

now when user searches two dates like 25/06/2006 and 10/09/2006 then
i am writing query like

start_date = formatdatetime("25/06/2006",vbshortdate)
end_date = formatdatetime("10/09/2006",vbshortdate)

"SELECT * FROM table WHERE datefield BETWEEN #"&start_date&"# AND
$"&end_date&""

but access is not searching and after searching diffrent dates i found
sometimes access searches month as day ,

so i change the date field's datatype in database but then when i try
it steel not run

i believe here lots of people experience and some may have feel this
problem plz tell me solution of problem or atleast give me hint of how
to do it.

thanx in advance
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 11 '06 #2
hardik wrote:
hi friends,

i am really surprized the way access behaves in date fields i mean
it's all ok when you have us time zone or us servers but if you have
diffrent timezone like uk then access creates so many problems ....

first of all i try access with uk settings in date/time in field but
access changes date after 09/11 to 11/09 i don't know why so i decided
to take it as text field steel it is creating problems

i have date field in my database

and when user selects two dates i need to find all the date between
those two dates.

currently i have assign text datatype for date field i am storing
dates in this field like

formatdatetime(date(),vbshortdate)

my server is uk based and here is it's date format:: dd-mm-yyyy

now when user searches two dates like 25/06/2006 and 10/09/2006 then
i am writing query like

start_date = formatdatetime("25/06/2006",vbshortdate)
end_date = formatdatetime("10/09/2006",vbshortdate)

"SELECT * FROM table WHERE datefield BETWEEN #"&start_date&"# AND
$"&end_date&""

but access is not searching and after searching diffrent dates i found
sometimes access searches month as day ,

so i change the date field's datatype in database but then when i try
it steel not run
i believe here lots of people experience and some may have feel this
problem plz tell me solution of problem or atleast give me hint of how
to do it.

thanx in advance
Date literals in Access MUST be either US format or a non-ambiguous format (ISO
or where the month uses alpha characters).
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Nov 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: xzzy | last post by:
http://netscan.research.microsoft.com/ReportCard.asp?timespan=y&searchfor=comp.databases.ms-access&searchdate=11%2F30%2F2003 interesting that the number of posts per day drops across the year, and...
4
by: JMCN | last post by:
object invalid or no longer set - confusion of the recordset in access 2003. i am currently converting from access 97 to access 2003. majority of the codes converted over perfectly fine, though...
12
by: Steve Elliott | last post by:
I have a query set up to gather together data between two specified dates. Shown in the query column as: Between #24/09/2004# And #01/10/2004# Is it possible to enter several different date...
2
by: zMisc | last post by:
I got a table with the following fields: BirthDay (Date) Reminder (Short integer) I need to select all records where BirthDay - Reminder <= Today to display a reminder. In Access and MS...
0
by: delso_it | last post by:
Hi ...can u help me how to creat a expiretion date access program like demo program...will be expire after 15days or 3days...:)
4
by: peterson | last post by:
We are trying to enter birthdays in a 00/00 date format, and it does not accept 2/29 or 02/29 as a legal date. Any work arounds for this? Thank you, Amy Peterson, MMI
14
by: pdavis06 | last post by:
I know that there is a thread about this, but I was unable to add to it; I just joined. The problem is that I do not want to change the date format for the entire database output, merely for a header...
1
by: amanda27 | last post by:
Right now I have a formula in the criteria of a query that tells it to pull data (from a datetime stamp field) with the date that is less than or equal to this Friday's date but I need it to not pull...
1
by: Connell | last post by:
Are there new guidelines for using Query by Form in Access 2007? I have not been able to construct such a QBF using the techniques that worked in prior versions. For example it won't accept date...
3
by: bknabl | last post by:
I tried setting up a new combo box to have todays date as a user choice by setting its property to a value list. Then for the row source it set it to =Date(). Access will not show what the expression...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.