Skip to main content
Inspiring
October 4, 2007
Answered

Inserting a Date from a Hidden Form Field

  • October 4, 2007
  • 7 replies
  • 700 views
I want a date to insert into the database from a hidden field on a form (to show when the form has been updated.) I know in PHP you would use <?php echo date('Y-m-d H:i:s');?> in the value box, but what is the syntax for ASP?

Cheers

Chuck
This topic has been closed for replies.
Correct answer Newsgroup_User
<%=Date()%>


"chuckomalley" <webforumsuser@macromedia.com> wrote in message
news:fe2mlc$4pi$1@forums.macromedia.com...
>I want a date to insert into the database from a hidden field on a form (to
> show when the form has been updated.) I know in PHP you would use <?php
> echo
> date('Y-m-d H:i:s');?> in the value box, but what is the syntax for ASP?
>
> Cheers
>
> Chuck
>


7 replies

Inspiring
October 4, 2007
On Thu, 4 Oct 2007 20:31:21 +0100, "Pat Shaw" <pat@nomail.com> wrote:

>I'll gladly take the credit for you Steve :-)

Hehehehe :-)
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Inspiring
October 5, 2007
Doh!!

Sorry Steve! It was a long day and I wasn't paying attention (can't afford it anyway.)

Cheers

Chuck
Inspiring
October 4, 2007
I'll gladly take the credit for you Steve :-)


"Steve Fleischer" <me@invalid.com> wrote in message
news:n72ag31pccahkkfu8opv00fjo5270fsmss@4ax.com...
> On Thu, 4 Oct 2007 14:11:14 +0000 (UTC), "chuckomalley"
> <webforumsuser@macromedia.com> wrote:
>
>>Thanks Pat!
>
> Errm...
> --
> Steve Fleischer
> steve at flyingtigerwebdesign dot com
> Hong Kong


Inspiring
October 4, 2007
On Thu, 4 Oct 2007 14:11:14 +0000 (UTC), "chuckomalley"
<webforumsuser@macromedia.com> wrote:

>Thanks Pat!

Errm...
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Inspiring
October 4, 2007
Thanks Pat!

Cheers

Chuck
Inspiring
October 4, 2007
On Thu, 4 Oct 2007 13:55:55 +0000 (UTC), "chuckomalley"
<webforumsuser@macromedia.com> wrote:

>Thanks Pat.
>
> I just realized I only need the date to show. with Date(), it will display as
>MM/DD/YYYY HH:MM:SS PM. What is the syntax inside the () to just get it to do
>MM/DD/YYYY? tried m,d,y and %m. %d, %y but that didn't work (ODBC error)

there are some examples here:

http://www.w3schools.com/asp/asp_examples.asp
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Inspiring
October 4, 2007
Thanks Pat.

I just realized I only need the date to show. with Date(), it will display as MM/DD/YYYY HH:MM:SS PM. What is the syntax inside the () to just get it to do MM/DD/YYYY? tried m,d,y and %m. %d, %y but that didn't work (ODBC error)

Cheers

Chuck
Newsgroup_UserCorrect answer
Inspiring
October 4, 2007
<%=Date()%>


"chuckomalley" <webforumsuser@macromedia.com> wrote in message
news:fe2mlc$4pi$1@forums.macromedia.com...
>I want a date to insert into the database from a hidden field on a form (to
> show when the form has been updated.) I know in PHP you would use <?php
> echo
> date('Y-m-d H:i:s');?> in the value box, but what is the syntax for ASP?
>
> Cheers
>
> Chuck
>