Doug
|
Posted: 01/21/2002, 5:53 PM |
|
How do I put the current date as a default in a text field. I am familiar with before show event.
-thanks
|
|
|
Alex Alexapolsky
|
Posted: 01/22/2002, 2:11 AM |
|
ASP :
fldmydate = now()
PHP :
$flddate_entered = date("y-d-M G:i",mktime($datetime["hour"],
$datetime["minute"], $datetime["second"], $datetime["month"],
$datetime["day"], $datetime["year"])) ;
|
|
|
Doug
|
Posted: 01/22/2002, 4:44 AM |
|
How do I put the date in Short Date Format "mm/dd/yy"
ASP:
fldmydate = now()
-what's a good resource for little things like this?
|
|
|
Nicole
|
Posted: 01/22/2002, 5:53 AM |
|
Doug,
use FormatDate() function:
' for short date format
fldmydate = FormatDate(now(), 2)
|
|
|
Doug
|
Posted: 01/22/2002, 6:37 AM |
|
I tried the code.
What I have is: "fldDateRequested = FormatDate(now(), 2)"
I am getting an error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'FormatDate'
Anymore help?
|
|
|
Alex Alexapolsky
|
Posted: 01/22/2002, 6:56 AM |
|
now() returns date + time and function expects date only
use date() function that returns pure date ,.e.g. fldxxx = date
|
|
|
Sven M. Olsen
|
Posted: 01/22/2002, 12:28 PM |
|
Here is my solution using PHP (my date field is called 'dato'):
$flddato = strftime("%Y-%m-%d");
|
|
|
Don Brown
|
Posted: 02/23/2003, 8:45 PM |
|
Use
fldmydate = date()
But that will not give you a two year date, only remove the time stamp.
|
|
|
|