Ask a Question related to ASP Database, Design and Development.
-
Alistair #1
is this a date issue??
hi all,
I have posted this to inetserver.asp.general too..I thought I had
crossposted but somehow I didn't, so please accept my apologies if the
multipost offends.
ok..the question....
I have a calendar app that is driving me nuts.
you can see it at [url]www.corruption.co.uk/events/calendar.asp[/url]
now, the problem is this...for some reason..only events that occur in
february are showing up
The DB (access 2000) contains 4 entries, each of these is identical except
for the event name and the event date. They occur on 27 Jan, 27 Feb, 27
March and 27 April.
I have response.written the sql so you can see what is being queried.
now, you can add new events if you like to test, but you will discover that
only events in february are displayed....you can confirm that the events are
in the DB by using the "edit my events". this displays what events you have
entered. by doing this you will see that the events have indeed been added
but are only displayed if they occur in february, and it doesn't mater what
year either...events in feb of any year will be displayed..events for any
other month in any year aren't.
I cannot see how this could be a date issue (mm/dd or dd/mm) as surely this
would affect all entries and not just the ones in feb. but if somone could
point out anything I would be really grateful.
source code is available if anyone wants to see it
many thanks
Alistair Guest
-
Date/Time Issue
The code looks okay. Are "EventTime" and "EventTimeTo" date/time columns in your table? If you output the query values without the LSTimeFormat()... -
MySQL Date issue
Anyone else have this issue? I've got a query that pulls dates out of a MySQL db, and often times the date fields have "0000-00-00" in the date... -
Date issue
Any resolution dealing with a simple Access database connection? I'm trying to output users whose birthday is within 5 days plus or minus. -
Date issue in php and mysql
On Mon, 25 Aug 2003 12:59:19 +0200 "Ricki Susic" <rickFJERNDETTEi@webfabrikken.net> wrote: You will have to be a little more specific about... -
*very* strange date issue
hi, i am having big issues in deploying my asp.net web application to our web server. dates do not behave the same as on my development... -
Aaron Bertrand - MVP #2
Re: is this a date issue??
>>>>> #01/01/04# AND endDate <= #31/01/04#))
HEY!!!!! STOP USING AMBIGUOUS DATE FORMATS!!!!!!!!!!!!
#2004-01-01# AND endDate <= #2004-01-31#
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand - MVP Guest
-
Invotion #3
is this a date issue??
Hello,
Could it be that access does not support '<=' and '>='
for date/time values? When I try to do the same from
within Access, those operators are not available and I
get a type conversion error if I type them in and execute
the query. Try using > and < instead just to see if it
works. Then you may have to check time values as well to
get the border dates. (i.e. > '12/01/2003 23:59:59' for
january first).
Sincerely,
Invotion Engineering Team
Advanced Microsoft Hosting Solutions
[url]http://www.Invotion.com[/url]
thought I had>-----Original Message-----
>hi all,
>
>I have posted this to inetserver.asp.general too..Iapologies if the>crossposted but somehow I didn't, so please accept my[url]www.corruption.co.uk/events/calendar.asp[/url]>multipost offends.
>
>ok..the question....
>
>I have a calendar app that is driving me nuts.
>
>you can see it atthat occur in>
>now, the problem is this...for some reason..only eventsis identical except>february are showing up
>
>The DB (access 2000) contains 4 entries, each of theseJan, 27 Feb, 27>for the event name and the event date. They occur on 27being queried.>March and 27 April.
>
>I have response.written the sql so you can see what iswill discover that>
>now, you can add new events if you like to test, but youthat the events are>only events in february are displayed....you can confirmwhat events you have>in the DB by using the "edit my events". this displaysindeed been added>entered. by doing this you will see that the events havedoesn't mater what>but are only displayed if they occur in february, and itdisplayed..events for any>year either...events in feb of any year will bedd/mm) as surely this>other month in any year aren't.
>
>I cannot see how this could be a date issue (mm/dd orbut if somone could>would affect all entries and not just the ones in feb.>point out anything I would be really grateful.
>
>source code is available if anyone wants to see it
>
>many thanks
>
>
>.
>Invotion Guest
-
Alistair #4
Re: is this a date issue??
"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
news:OF3gklE5DHA.3896@TK2MSFTNGP11.phx.gbl...I know what you are saying but I fail to see what is ambiguous about this!!!>> >>>>> #01/01/04# AND endDate <= #31/01/04#))
> HEY!!!!! STOP USING AMBIGUOUS DATE FORMATS!!!!!!!!!!!!
>
> #2004-01-01# AND endDate <= #2004-01-31#
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
the SQL staement shows
startDate >= #01/01/04# AND endDate <= #31/01/04#
how could that be interpreted as anything other than 31st of Jan??
and if for some reason it was being interpreted wrongly then surely
startDate >= #01/02/04# AND endDate <= #29/02/04#
would also be wrong??...yet anything for february works!!!
however...if I was to take the date from the DB and split it, then rearange
it as yyyy-mm-dd you think this would work...I will try it first thing in
the morning.
Alistair Guest
-
Alistair #5
Re: is this a date issue??
"Alistair" <news@*remove*alistairb.co.uk> wrote in message
news:101b0vd16n0jsdf@corp.supernews.com...this!!!>
> "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
> news:OF3gklE5DHA.3896@TK2MSFTNGP11.phx.gbl...>> >> > >>>>> #01/01/04# AND endDate <= #31/01/04#))
> > HEY!!!!! STOP USING AMBIGUOUS DATE FORMATS!!!!!!!!!!!!
> >
> > #2004-01-01# AND endDate <= #2004-01-31#
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > [url]http://www.aspfaq.com/[/url]
> >
> >
> I know what you are saying but I fail to see what is ambiguous aboutrearange>
> the SQL staement shows
>
> startDate >= #01/01/04# AND endDate <= #31/01/04#
>
> how could that be interpreted as anything other than 31st of Jan??
>
> and if for some reason it was being interpreted wrongly then surely
>
> startDate >= #01/02/04# AND endDate <= #29/02/04#
>
> would also be wrong??...yet anything for february works!!!
>
>
>
> however...if I was to take the date from the DB and split it, thenok..couldn't wait until the morning...> it as yyyy-mm-dd you think this would work...I will try it first thing in
> the morning.
>
>
it sems to be working...I have a few more tests to do though..
in doing so, I've actually discovered that I don't really need to change the
date formate...I was using Cdate which only gave me two digits for the
year..once I removed this I was getting all 4 digits and this meant no
ambiguous dates.
Hopefully I'll never have to trouble Aaron again as he's a genius with ASP
and I think I've upset him with my questions
thanks all
Alistair Guest
-
Aaron Bertrand - MVP #6
Re: is this a date issue??
> Hopefully I'll never have to trouble Aaron again as he's a genius with ASP
No, not upset. Just amazed that this comes up every day; seems like> and I think I've upset him with my questions
everyone has forgotten about Y2K and doesn't understand why software gets
confused when you pass it an ambiguous format...
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand - MVP Guest



Reply With Quote

