Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: SV: Re: date function get 1899 in access database


Message #1 by =?us-ascii?Q?Hakan_Frennesson?= <hakan@c...> on Fri, 9 Nov 2001 09:55:59 +0100
Hi!



Another quick fix would be to set the default value in that particular date

field to date() or now() if you want a timestamp, and let Access do the

work.



Hakan



-----Ursprungligt meddelande-----

Fran: Pappas Nikos [mailto:pappas@c...]

Skickat: den 9 november 2001 09:42

Till: ASP Databases

Amne: [asp_databases] Re: date function get 1899 in access database





Hi Ken

Sorry to jump in like that

inssql = "INSERT INTO ADVBYCATEG (PICTURE,description,CATEGORY,url,DATEIN)"

inssql =inssql & " VALUES "

inssql =inssql & " ('" & request.form("PICTURE") & "','" &

request.form("description") & "','" & request.form("ATEGORY") & "','" &

request.form("url") & "',date());"



myConnection.execute inssql



This works fine with me using acces 2000

All the best

Nikos



At Friday9/11/2001, you wrote:

>How are you putting the date *into* Access in the first place?

>

>Cheers

>Ken

>

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>From: "dont worry" <aspmailbox@y...>

>Subject: [asp_databases] date function get 1899 in access database

>

>

>: I use date() function to insert current date into

>: access database table and it inserts 1899 ..... On the

>: asp page response.write it gives correct date?

>

>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>

>

>




$subst('Email.Unsub')















  Return to Index