it's the idiot with his query strings again...."yippe ee" I hear aaron shout
this time the problem is with a date format query
I have a query string thus
strSQL = "SELECT * FROM users where creation_date >= #" & strthisweekstar t &
"# AND creation_date <= #" & strthisweekend & "#"
strthisweek start is dateadd("d",-7,date) and strthisweekend is date(). The
idea is it shows the records that were added in the last week
so a week ago a response.write of this gave
SELECT * FROM users where creation_date >= #31/12/2004# AND creation_date <=
#7/01/2004#
and I thought everything was fine as I got the correct number of records
today I check again and I get the result of zero records, I know this is
wrong..so another response.write and I get
SELECT * FROM users where creation_date >= #07/01/2004# AND creation_date <=
#14/01/2004#
which *appears* right only it seems that the first date is in the format
mm/dd/yyy and the second is dd/mm/yyyy
I've checked this by creating a record with the creation date of 14/06/2004,
the query then returns correctly, 1 record
so, the pages are interpreting anything that CAN be in the format of
mm/dd/yyyy as such and anything that can't be this format is interpreted as
dd/mm/yyyy
where do I tell the pages which date format to use for ALL dates?
bearing in mind I'm in the UK and my windows settings are in UK format
(dd/mm/yyyy), which I thought would automatically set the correct format.
thanks 3 3391
hi,
could you use only yyyy/mm/dd ??
if this is possible you have always invert you dates, else
you have treat each case before make a search.
bye
--
««««««««»»»»»»» »»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Alistair" <news@*remove*a listairb.co.uk> escreveu na mensagem
news:10******** ****@corp.super news.com... it's the idiot with his query strings again...."yippe ee" I hear aaron
shout this time the problem is with a date format query
I have a query string thus
strSQL = "SELECT * FROM users where creation_date >= #" & strthisweekstar t
& "# AND creation_date <= #" & strthisweekend & "#"
strthisweek start is dateadd("d",-7,date) and strthisweekend is date().
The idea is it shows the records that were added in the last week
so a week ago a response.write of this gave
SELECT * FROM users where creation_date >= #31/12/2004# AND creation_date
<= #7/01/2004#
and I thought everything was fine as I got the correct number of records
today I check again and I get the result of zero records, I know this is wrong..so another response.write and I get
SELECT * FROM users where creation_date >= #07/01/2004# AND creation_date
<= #14/01/2004#
which *appears* right only it seems that the first date is in the format mm/dd/yyy and the second is dd/mm/yyyy
I've checked this by creating a record with the creation date of
14/06/2004, the query then returns correctly, 1 record
so, the pages are interpreting anything that CAN be in the format of mm/dd/yyyy as such and anything that can't be this format is interpreted
as dd/mm/yyyy
where do I tell the pages which date format to use for ALL dates?
bearing in mind I'm in the UK and my windows settings are in UK format (dd/mm/yyyy), which I thought would automatically set the correct format.
thanks
I have seen this but I don't know how to use it. I would ahave to change 4
fields in a DB containing 22,000 entries too. I think
anyway...if I do a response.write date() I get the correct format....so why
would it be different for other times?
"Vilmar Brazão de Oliveira" <su*****@hitecn et.com.br> wrote in message
news:uB******** ******@TK2MSFTN GP10.phx.gbl... hi, could you use only yyyy/mm/dd ?? if this is possible you have always invert you dates, else you have treat each case before make a search. bye
--
««««««««»»»»»»» »»»»»»» Vlmar Brazão de Oliveira Desenvolvimento Web HI-TEC "Alistair" <news@*remove*a listairb.co.uk> escreveu na mensagem news:10******** ****@corp.super news.com... it's the idiot with his query strings again...."yippe ee" I hear aaron shout this time the problem is with a date format query
I have a query string thus
strSQL = "SELECT * FROM users where creation_date >= #" &
strthisweekstar t & "# AND creation_date <= #" & strthisweekend & "#"
strthisweek start is dateadd("d",-7,date) and strthisweekend is date(). The idea is it shows the records that were added in the last week
so a week ago a response.write of this gave
SELECT * FROM users where creation_date >= #31/12/2004# AND
creation_date <= #7/01/2004#
and I thought everything was fine as I got the correct number of records
today I check again and I get the result of zero records, I know this is wrong..so another response.write and I get
SELECT * FROM users where creation_date >= #07/01/2004# AND
creation_date <= #14/01/2004#
which *appears* right only it seems that the first date is in the format mm/dd/yyy and the second is dd/mm/yyyy
I've checked this by creating a record with the creation date of 14/06/2004, the query then returns correctly, 1 record
so, the pages are interpreting anything that CAN be in the format of mm/dd/yyyy as such and anything that can't be this format is interpreted as dd/mm/yyyy
where do I tell the pages which date format to use for ALL dates?
bearing in mind I'm in the UK and my windows settings are in UK format (dd/mm/yyyy), which I thought would automatically set the correct
format. thanks
HI,
I don't know exactly, but have you tried anything like this:
'07/01/2004' instead #07/01/2004#
??
bye
--
««««««««»»»»»»» »»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
"Alistair" <news@*remove*a listairb.co.uk> escreveu na mensagem
news:10******** *****@corp.supe rnews.com... I have seen this but I don't know how to use it. I would ahave to change 4 fields in a DB containing 22,000 entries too. I think
anyway...if I do a response.write date() I get the correct format....so
why would it be different for other times? "Vilmar Brazão de Oliveira" <su*****@hitecn et.com.br> wrote in message news:uB******** ******@TK2MSFTN GP10.phx.gbl... hi, could you use only yyyy/mm/dd ?? if this is possible you have always invert you dates, else you have treat each case before make a search. bye
--
««««««««»»»»»»» »»»»»»» Vlmar Brazão de Oliveira Desenvolvimento Web HI-TEC "Alistair" <news@*remove*a listairb.co.uk> escreveu na mensagem news:10******** ****@corp.super news.com... it's the idiot with his query strings again...."yippe ee" I hear aaron shout this time the problem is with a date format query
I have a query string thus
strSQL = "SELECT * FROM users where creation_date >= #" & strthisweekstar t & "# AND creation_date <= #" & strthisweekend & "#"
strthisweek start is dateadd("d",-7,date) and strthisweekend is
date(). The idea is it shows the records that were added in the last week
so a week ago a response.write of this gave
SELECT * FROM users where creation_date >= #31/12/2004# AND creation_date <= #7/01/2004#
and I thought everything was fine as I got the correct number of
records today I check again and I get the result of zero records, I know this
is wrong..so another response.write and I get
SELECT * FROM users where creation_date >= #07/01/2004# AND
creation_date <= #14/01/2004#
which *appears* right only it seems that the first date is in the
format mm/dd/yyy and the second is dd/mm/yyyy
I've checked this by creating a record with the creation date of 14/06/2004, the query then returns correctly, 1 record
so, the pages are interpreting anything that CAN be in the format of mm/dd/yyyy as such and anything that can't be this format is
interpreted as dd/mm/yyyy
where do I tell the pages which date format to use for ALL dates?
bearing in mind I'm in the UK and my windows settings are in UK format (dd/mm/yyyy), which I thought would automatically set the correct format. thanks
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard Hollenbeck |
last post by:
I'm trying to write some code that will convert any of the most popular
standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan
1908) and compare the first with the second and calculate days, months, and
years. This is not for a college course. It's for my own personal
genealogy website. I'm stumped about the code. I'm working on it but not
making much progress. Is there any free code available anywhere? I know it...
|
by: Dario Di Bella |
last post by:
Hi all,
we have the following urgent issue affecting our development team.
Initially we had one particular workstation that failed executing
queries on a DB2 database, raising an invalid date format exception
(SQLSTATE=22007). The same queries worked fine on all the other
workstations. The date format we want to use is "dd/mm/yyyy".After
reinstalling several times the db2 runtime client w/ different
options, we found on a technical forum...
|
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 overlap existing records from
the same table.
I had this all working some time ago, but recently when I have gone back to
do more testing, part of these validations no longer work. While there have
been changes to the code in the meantime, I cannot...
|
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
|
by: James P. |
last post by:
Hello there,
In my asp.net page using VB, I have a date text field in mm/dd/yyyy
format. When a date is entered, I'd like to validate it to make sure
the date is greater than or equal to the current date. If not, I'd
like to display the error message to ValidationSummary.
It seems to make sense to me to use CompareValidator but the problem
is put the current date into CompareValidator. So, I created a hidden
text field in my aspx. ...
| |
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 follows:
function doDateCheckNow(source, args)
{
var oDate = document.getElementById(source.controltovalidate); //
dd/mm/yyyy
|
by: Alok yadav |
last post by:
i am using a webservice in which a method is serach. i use this method
which accept a argument of date type in dd/MM/yyyy formate. i have a
textbox which accept the date from the user, when i convert textbox data
into Datatime formate it converted into MM/dd/yyyy formate, but i have a
requirement in dd/MM/yyyy formate.
please help me, i am using c#.
|
by: Darin |
last post by:
I have an applicatoin that works 100% perfect when running on a machine
setup for English (United States), but when I change it to Spanish
(Mexico), the dates start giving me fits.
THe reason is USA is mm/dd/yyyy and mexico is dd/mm/yyyy. So, with the
computer set to mexico, any standard CDATE function is going to return
the date in the dd/mm/yyyy setting since that is what the computer is
set to.
I want to be able to enter a date in...
|
by: ARC |
last post by:
Hello all,
General question for back-end database that has numerous date fields where
the database will be used in regions that put the month first, and regions
that do not.
Should I save a date format in the table design, such as: mm/dd/yyyy?
What I've done for years is to store the date format in date fields, then on
the forms, based on their region, I would set the date formats on form_load
|
by: fniles |
last post by:
On my machine in the office I change the computer setting to English (UK) so
the date format is dd/mm/yyyy instead of mm/dd/yyyy for US.
This problem happens in either Access or SQL Server.
In the database I have a table with Date/time column. The database is
located on a machine that is set to dd/mm/yyyy also.
When I enter date 7/1/08 (as in January 7, 2008), it stores it in the
database as 1/7/08 instead of 7/1/08. Why is it like that...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |