Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?



I think I will need to use calculations at some point, is there a way to pass the Now() value into the datetime field.
I would have used the timestamp but it isn't available on my SQL server.

Many thanks,

Rob

"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message news:%238E5eM8nIHA.4912@xxxxxxxxxxxxxxxxxxxxxxx
anon wrote:
Thanks Bob,

That seems to moved my problem forward a point, but I a get a value of
00:00:00 in my SQL field table.

How are you verifying this?
Have you run a trace using SQL Profiler to enable you to see the actual
sql statements being run on the sql server when the asp page runs?

Ideally I want to update/insert one column with the current date and
another with the current time.


As the name implies, datetime datatypes always store both date and time.
If no time is supplied, midnight (00:00:00) is stored. If no date is
supplied, the seed date (12/31/1899, I think - it's not really
important) is stored. If you don't need to do date or time arithmetic,
and it's absolutely critical that the date and time be stored
separately, then you might consider using another datatype.
--
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.



.



Relevant Pages

  • RE: Connection problems from web server to sbs running sql server
    ... the problem should be a SQL issue. ... Microsoft CSS Online Newsgroup Support ... Connection problems from web server to sbs running sql server ... | server and the SQL server with no luck. ...
    (microsoft.public.windows.server.sbs)
  • RE: upgrade sharepoint database to SQLserver - connect error
    ... 2005 database after he move the sharepoint data from MSDE to SQL 2005. ... This newsgroup is primarily for issues involving deployment, configuration, ... | I am trying to move my SharePoint data bases from MSDE to the Sql Server. ...
    (microsoft.public.windows.server.sbs)
  • RE: KB829358 has killed Sharepoint services
    ... Thank you for posting in SBS newsgroup. ... it may be caused by after applying update the SQL Server ... following link and then manually install the update: ...
    (microsoft.public.windows.server.sbs)
  • RE: Cannot Register SQL Server Instance
    ... Microsoft CSS Online Newsgroup Support ... When opening a new thread via the web interface, we recommend you check the ... Cannot Register SQL Server Instance ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS 2003 startup SQL not starting password ?
    ... the password of the service account that you use- whether it's for SQL Server ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)