If you are wanting to put the current date and time try this:
#CreateODBCDateTime(Now())#
That will insert the current date and time as a timestamp
Actually, the CreateODBCDateTime function isn't required here, as the Now
function creates an ODBC date/time stamp.
Dave Watts, CTO, Fig
you can createODBCDateTime in CF Code, or create a field in the database
that is not null and of datatype timestamp. You could also use the SQL
Reserve: timestamp
~Simon
-Original Message-
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 26, 2000 11:04 AM
To:
Have you tried using #Now()# in your insert statement? That should work in
most cases.
--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC 28270
www.solutionmasters.com
704.563.5559 x 228 Voice
704.849.9291 Fax
-Original Message-
From:
If you are wanting to put the current date and time try this:
#CreateODBCDateTime(Now())#
That will insert the current date and time as a timestamp
Larry Juncker
Senior Cold Fusion Programmer
Heartland Internet
-Original Message-
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent:
Try using the GetDate() function. This is in Transact SQL (M$ SQL 6.5 and 7
I think), I'm not sure if it is an ANSI function. If not, use:
#DateFormat(Now(), 'mmm dd, ')# #TimeFormat(Now(), 'HH:mm:ss')#
in Cold Fusion.
Russel
#CreateODBCDateTime(Now())#
--
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL:
How do I input the current date and time into a database?
Rich
The simplest way is to set up the table so that the current date/time
is the default value for that column. Then you don't need to timestamp
it yourself, the DBMS does it for you.
Nick
The #Now()# worked ok.
thanks for the help,
Rich
-Original Message-
From: Russel Madere [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 26, 2000 11:44 AM
To: CF-Talk
Subject: RE: Date Timestamp??
Try using the GetDate() function. This is in Transact SQL (M$ SQL 6.5 and 7
I think
either let the database do it, or insert #CreateODBCDateTime(Now())#
~Simon
-Original Message-
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 26, 2000 11:48 AM
To: CF-Talk
Subject: RE: Date Timestamp??
How do I input the current date and time into a database
Wouldn't it be better to let the database handle it instead of CF? Which
database are you using Rich?
Regards,
Marc Garrett
- Original Message -
From: "Larry Juncker" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, September 26, 2000 11:32
Access. I have it working ok with the #Now()# input. Is this a problem?
Rich
-Original Message-
From: Marc Garrett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 26, 2000 1:44 PM
To: CF-Talk
Subject: Re: Date Timestamp??
Wouldn't it be better to let the database handle
-
From: "HappyToad.com" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, September 26, 2000 4:07 PM
Subject: RE: Date Timestamp??
Access. I have it working ok with the #Now()# input. Is this a problem?
Rich
-Original Message-
From: Marc Garrett [mai
In Access I just create a default value for a field in Access itself using
Date()+Time()
Kevin Parker
Service and Communication
WorkCover Corporation
[EMAIL PROTECTED]
ph: +61 8 82332548
fax: +61 8 82332000
-Original
13 matches
Mail list logo