Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: "anon" <anon@xxxxxxxx>
- Date: Wed, 16 Apr 2008 14:27:28 +0100
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,How are you verifying this?
That seems to moved my problem forward a point, but I a get a value of
00:00:00 in my SQL field table.
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.
.
- Follow-Ups:
- Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: Bob Barrows [MVP]
- Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- References:
- UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: anon
- Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: Bob Barrows [MVP]
- Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: anon
- Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- From: Bob Barrows [MVP]
- UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- Prev by Date: Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- Next by Date: Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- Previous by thread: Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- Next by thread: Re: UPDATING/INSERTING DATETIME FIELDS FROM ASP?
- Index(es):
Relevant Pages
|