html form current datetime
hi,
i have a form that has a field, that i would like to set the field to the current date and time in the context of 0000-00-00 00:00:00 could someone help. Cheers, Mel |
If you want to use javascript then use quick one I just wrote:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> If you have SSI you can use that too. |
thanks for the script.
what i am trying to do, is to display the current date and time only. not live date and time, so the user will be able to adjust it. with the nice script you sent me we cant adjust it!!! Cheers, |
Use this then:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
thanks very much.
the display i get is showing the year wrong!! 3903-4-16 19:48:34 another question. i would like to have another field within the frame, but with the current time 10 minutes ago!!!. so with the above it would display 2003-4-16 19:38:34 thanks one again |
another question. could i possibly display the results in the format 0000-00-00 00:00:00
cheers |
I actually made some typos - this should work:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
excellent results, thanks.
the year is still not right 3903-04-16 20:52:35 3903-04-16 20:42:35 |
It is fine for me - what browser are you using - I have had this problem before.
|
I jusst tried it in IE and I see what you mean.
|
Hi,
i have a way to solve it till 2004. by removing the get year. but i dont think this is good!! thanks for the help. i have another question. is it possible to implement this in a pop up calendar!!!! date, and time Chers, |
This seems OK:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
I'm not sure what you mean by in a popup calendar - the chances are yes, but I ain't gonna write it!
|
another problem
3903-04-16 21:09:44 3903-04-16 21:-1:44 |
thanks i got 2003 working.
this is some results. 2003-04-16 21:5:01 2003-04-16 21:15:01 is there anyway to display 21:5:01 as 21:05:01 cheers |
All times are GMT -5. The time now is 05:01 PM. |