473,385 Members | 1,730 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,385 software developers and data experts.

Date problem with not american format

hi,

i have to use an existing Access 2000 database with datetime fields in
this format under VB6:
- dd/mm/yyyy hh:nn:ss
- The operating system format is dd/mm/yyyy

I have to compare in my SQL like this (include date and time in the
same field)
Start_TimeStamp <= #" & DateAdd("n", gudt_App.iAlarm_BeforeMinutes,
Now) & "#"

the problem is that 'Start_TimeStamp' value is the 7 january and is
recognized like the 1st july...
I took a look to many posts here, but i didn't found how to do with an
existing database, can you help me ?

Thanks
Nov 13 '05 #1
1 1553
Regardless of what your regional settings are, you must use mm/dd/yyyy
format (or an unambiguous one such as dd mmm yyyy or yyyy-mm-dd) in your SQL
if you're going to use the # delimiters.

Try:

Start_TimeStamp <= " & Format(DateAdd("n",
gudt_App.iAlarm_BeforeMinutes,Now), "\#mm\/dd\/yyyy\#")

You might find it useful to read Allen Browne's "International Dates in
Access" at
http://members.iinet.net.au/~allenbrowne/ser-36.html or what I have at
http://members.rogers.com/douglas.j....artAccess.html

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Station Media" <go****@easycolorthemes.com> wrote in message
news:5c**************************@posting.google.c om...
hi,

i have to use an existing Access 2000 database with datetime fields in
this format under VB6:
- dd/mm/yyyy hh:nn:ss
- The operating system format is dd/mm/yyyy

I have to compare in my SQL like this (include date and time in the
same field)
Start_TimeStamp <= #" & DateAdd("n", gudt_App.iAlarm_BeforeMinutes,
Now) & "#"

the problem is that 'Start_TimeStamp' value is the 7 january and is
recognized like the 1st july...
I took a look to many posts here, but i didn't found how to do with an
existing database, can you help me ?

Thanks

Nov 13 '05 #2

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

Similar topics

0
by: Ray | last post by:
Date problem. Using non American date formats with Microsoft Access and Visual Basic. I set my regional settings to English(Ireland) or English(United Kingdom) and my date appears in Access as...
7
by: Niall Porter | last post by:
Hi all, I'm building an ASP app on a Windows 2000/IIS machine which interfaces with our SQL Server 2000 database via OLE DB. Since we're based in the UK I want the users to be able to type in...
4
by: mike | last post by:
I have a data like: 03-Jul-05 and need to convert it to: 7/3/2005 Is there a function for this already?
4
by: Peter Bailey | last post by:
I have a vba string taht dynamically creates the query which has two dates in it that it grabs off an open form as a string from the textbox. What I generate in vba is: SELECT DOSMBK.Date,...
3
by: Lyn | last post by:
Hi, I am developing a project in which I am checking for records with overlapping start/end dates. Record dates must not overlap date of birth, date of death, be in the future, and must not...
5
by: Macca | last post by:
Hi, I have a table which has a date/time field. I am storing them as follows :- 01/01/2005 11:25 01/01/2005 19:44 02/01/2005 05:04
5
by: Daveo | last post by:
Hi there, I'm having a problem with my database changing the date that I enter in the format dd/mm/yyyy into American format. Bizarrely, when enter the date in a textbox it changes round, but if...
12
by: Diego | last post by:
Can I validate (possibly with a compare validator) a Date entered by the user based upon his regional settings? I.e. if a user is american the format would be mm/dd/yyyy, if brittish dd/mm/yyyy...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
2
by: Stevienashaa | last post by:
Hello I'm using Access 2003, and I have a query (written in SQL) which has two parameters and asks the user for two dates. This has been working fine. Today I modified the query, removing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.