HighDots Forums  

Date() in the hidden field

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Date() in the hidden field in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wally Kolcz
 
Posts: n/a

Default Date() in the hidden field - 01-01-2005 , 05:46 PM






Does Date() grab the current date for a form? If I put it in a hidden field
will it submit it to the database at today's date?

I have a hidden field on a form and want it to input the current date into a
database by way of an update form. I have the database set up as a Date/Time
with a short date format. When I got to update using the form I get:

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.

Now the update SQL string has it as being entered as Date (Not text or
number). The Access database has the field set up as Date/Time...so what's
the problem?

Any advice?



Reply With Quote
  #2  
Old   
Bill Horvath .:CMX:.
 
Posts: n/a

Default Re: Date() in the hidden field - 01-01-2005 , 07:11 PM






What server model are you using?

--
Bill Horvath
Free Tutorials for Studio MX
http://www.communitymx.com/free.cfm
Free 10 Day Trial
http://www.communitymx.com/joincmx.cfm
"Wally Kolcz" <wkolcz (AT) comcast (DOT) net> wrote

Quote:
Does Date() grab the current date for a form? If I put it in a hidden
field
will it submit it to the database at today's date?

I have a hidden field on a form and want it to input the current date into
a
database by way of an update form. I have the database set up as a
Date/Time
with a short date format. When I got to update using the form I get:

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.

Now the update SQL string has it as being entered as Date (Not text or
number). The Access database has the field set up as Date/Time...so what's
the problem?

Any advice?





Reply With Quote
  #3  
Old   
Bill Horvath .:CMX:.
 
Posts: n/a

Default Re: Date() in the hidden field - 01-01-2005 , 08:23 PM



Wally,
For ASP, you can set the hidden field's value as:
<%= Date() %>

--
Bill Horvath
Free Tutorials for Studio MX
http://www.communitymx.com/free.cfm
Free 10 Day Trial
http://www.communitymx.com/joincmx.cfm
"Wally Kolcz" <wkolcz (AT) comcast (DOT) net> wrote

Quote:
ASP/VB





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.