Ask a Question related to ASP, Design and Development.
-
grw #1
Dates and databases
[url]http://www.aspfaq.com/show.asp?id=2260[/url]
YYYYMMDD hh:mm:ss
grw Guest
-
Between Dates
I am trying to query an online access database and return records that have occurred between dates. I am using another query which does work to... -
Dates & SQL
In my CF form I have created a date object using #DateFormat(Now(),"MM/DD/YY")# which displays the date as: 07/29/05. When the date is inserted... -
Dates again
Hello all I'm having trouble getting iis to understand the UK format of dates ASP off a MS Access database I have the following query:... -
Federated Databases, joins across databases etc
Greetings, I want to do a join between 2 tables on 2 different db2 databases on the same server. I assume that I have to use federated databases. I... -
Help with Dates please
Hi, In a SQL table I have a field named departure and a date in inserted in it. What is the exact syntax to get only records with a future date... -
grw #2
Dates and Databases
[url]http://www.aspfaq.com/show.asp?id=2260[/url]
Inserting into an Access database using the above script generates this
error :
Microsoft JET Database Engine error '80040e07'
Syntax error in date in query expression '#20031021 20:36#'.
Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this valid
in all situations, or am I doing something wrong in the first step?
Cheers!
grw Guest
-
grw #3
Re: Dates and databases
Sorry - quick fingers, ignore this one
"grw" <none@none.com> wrote in message
news:uIbHSY6lDHA.3504@TK2MSFTNGP11.phx.gbl...> [url]http://www.aspfaq.com/show.asp?id=2260[/url]
>
> YYYYMMDD hh:mm:ss
>
>
>
>
>
grw Guest
-
Ken Schaefer #4
Re: Dates and Databases
I would use YYYY/MM/DD
I have used that with both Access/Jet, and SQL Server with plenty of
success.
Cheers
Ken
"grw" <none@none.com> wrote in message
news:OGh4Jb6lDHA.2528@TK2MSFTNGP10.phx.gbl...
: [url]http://www.aspfaq.com/show.asp?id=2260[/url]
:
: Inserting into an Access database using the above script generates this
: error :
: Microsoft JET Database Engine error '80040e07'
: Syntax error in date in query expression '#20031021 20:36#'.
:
: Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
:
: If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
:
: If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this valid
: in all situations, or am I doing something wrong in the first step?
:
: Cheers!
:
:
:
:
:
Ken Schaefer Guest
-
Peter Foti #5
Re: Dates and Databases
"grw" <none@none.com> wrote in message
news:OGh4Jb6lDHA.2528@TK2MSFTNGP10.phx.gbl...I have not tried this myself, but if you include the "time designator"> [url]http://www.aspfaq.com/show.asp?id=2260[/url]
>
> Inserting into an Access database using the above script generates this
> error :
> Microsoft JET Database Engine error '80040e07'
> Syntax error in date in query expression '#20031021 20:36#'.
>
> Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
>
> If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
>
> If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this valid
> in all situations, or am I doing something wrong in the first step?
character (as specified in ISO 8601), will it work then?
Basic: YYYYMMDDThhmmss
Ex - 20031021T100900
Extended: YYYY-MM-DDThh:mm:ss
Ex - 2003-10-21T10:09:00
Regards,
Peter Foti
Peter Foti Guest
-
grw #6
Re: Dates and Databases
Tried both methods and similar errors unfortunately Peter.
"Peter Foti" <peterf@systolicnetworks.com> wrote in message
news:vpafs5qo0qlm53@corp.supernews.com...valid> "grw" <none@none.com> wrote in message
> news:OGh4Jb6lDHA.2528@TK2MSFTNGP10.phx.gbl...> > [url]http://www.aspfaq.com/show.asp?id=2260[/url]
> >
> > Inserting into an Access database using the above script generates this
> > error :
> > Microsoft JET Database Engine error '80040e07'
> > Syntax error in date in query expression '#20031021 20:36#'.
> >
> > Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
> >
> > If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
> >
> > If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this>> > in all situations, or am I doing something wrong in the first step?
> I have not tried this myself, but if you include the "time designator"
> character (as specified in ISO 8601), will it work then?
>
> Basic: YYYYMMDDThhmmss
> Ex - 20031021T100900
>
> Extended: YYYY-MM-DDThh:mm:ss
> Ex - 2003-10-21T10:09:00
>
> Regards,
> Peter Foti
>
>
grw Guest
-
Bob Barrows #7
Re: Dates and Databases
grw wrote:
Access, actually Jet, uses non-standard language in its JetSQL. For example,> [url]http://www.aspfaq.com/show.asp?id=2260[/url]
>
> Inserting into an Access database using the above script generates
> this error :
> Microsoft JET Database Engine error '80040e07'
> Syntax error in date in query expression '#20031021 20:36#'.
>
> Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
>
> If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
>
> If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this
> valid in all situations, or am I doing something wrong in the first
> step?
>
> Cheers!
using # to delimit dates is non-standard. The format required for dates is
also non-standard. If you believe the online help, then the only acceptable
format for dates is US format: m/d/yyyy. However, we have discovered that it
will also handle dates in yyyy-mm-dd and yyyy/mm/dd formats. The ISO
standard format that you attempted to use is unfortuantely not handled.
For your specific purpose, JetSQL has access to many VBA functions,
including Date(), Now(), and Time(), so you do not need to concatenate the
values from those functions into your SQL statements. You can use the
function calls themselves:
Update UsersTable SET UpdateTime=Now()
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
grw #8
Re: Dates and Databases
Interesting thanks Bob
I guess, apart from the delimiters, this would upscale to SQL just as well.
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eCbh9y#lDHA.1884@TK2MSFTNGP09.phx.gbl...example,> grw wrote:>> > [url]http://www.aspfaq.com/show.asp?id=2260[/url]
> >
> > Inserting into an Access database using the above script generates
> > this error :
> > Microsoft JET Database Engine error '80040e07'
> > Syntax error in date in query expression '#20031021 20:36#'.
> >
> > Using SQL : UsersTable SET UpdateTime=#"& dbDate(Now())&"# .....
> >
> > If YYYYMMDD hh:mm:ss is a universal date, why is it rejecting it?
> >
> > If I change it to YYYY/MM/DD hh:mm:ss it then becomes valid. Is this
> > valid in all situations, or am I doing something wrong in the first
> > step?
> >
> > Cheers!
> Access, actually Jet, uses non-standard language in its JetSQL. Foracceptable> using # to delimit dates is non-standard. The format required for dates is
> also non-standard. If you believe the online help, then the onlyit> format for dates is US format: m/d/yyyy. However, we have discovered that> will also handle dates in yyyy-mm-dd and yyyy/mm/dd formats. The ISO
> standard format that you attempted to use is unfortuantely not handled.
>
> For your specific purpose, JetSQL has access to many VBA functions,
> including Date(), Now(), and Time(), so you do not need to concatenate the
> values from those functions into your SQL statements. You can use the
> function calls themselves:
>
> Update UsersTable SET UpdateTime=Now()
>
> HTH,
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
grw Guest



Reply With Quote

