<%
Function GetItFromHere()
Dim strDateandTime
strDateandTime = now 'get date and time
strDateandTime = Trim(strDateandTime) 'remove spaces
GetItFromHere = strDateandTime 'pass it to the function returned
End Function
%>
<input type="text" value="<%GetItFromHere%>">
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Jerry <> wrote in message
news:C1DCF592-2631-4C8F-9778-...
> With the following code I am trying to simply set and display the current
date time in an input box. The input box will not accept a variable that
contains any spaces (i.e., a space between date and time). It works if I
hardcode a date time, but I need the current date time. The code also works
as long as it is not within an input box (see 3rd line below).
>
> <tr><td align="right"><strong>Start Time:</strong></td><td
align="left"><input type="Text" name="Start_Time" value=<% =now %> /></td>
*THIS ONLY DISPLAYS DATE
> <td><% =now %></td> *THIS DISPLAYS BOTH DATE AND TIME
> </tr>
>
> Any ideas on how to accomplish this.
>
> Thanks,
> Jerry
> Any ideas