Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Inserting a Date from a Hidden Form Field

Explorer ,
Oct 04, 2007 Oct 04, 2007
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
TOPICS
Server side applications
693
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Oct 04, 2007 Oct 04, 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
>


Translate
LEGEND ,
Oct 04, 2007 Oct 04, 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
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 04, 2007 Oct 04, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2007 Oct 04, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 04, 2007 Oct 04, 2007
Thanks Pat!

Cheers

Chuck
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2007 Oct 04, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2007 Oct 04, 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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2007 Oct 04, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 04, 2007 Oct 04, 2007
Doh!!

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

Cheers

Chuck
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 05, 2007 Oct 05, 2007
LATEST
On Fri, 5 Oct 2007 05:02:23 +0000 (UTC), "chuckomalley"
<webforumsuser@macromedia.com> wrote:

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

LOL!! No worries. :-)
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines