Forums
This topic is locked
Displaying the current dat/time on an insert page
Posted 25 Apr 2007 01:49:06
1
has voted
25 Apr 2007 01:49:06 Dean Clarke posted:
Hi there,I am using Dreamweaver/ASP/Access 2003. What I would like to do is display the current date/time on an insert form and then submit that value into an Access database - therefore not use the Access =now() code. Is there any easy way to do this - I am a newbie to all of this.
Another problem I have is displaying the next available autonumber on the insert form too, I basically want to use the autonumber as a purchase order number, so it would be handy to have this information on my insert screen instead of submitting the page and getting the number that way.
I hope it makes sense, thanks.
Dean.
Replies
Replied 17 May 2007 17:32:12
17 May 2007 17:32:12 dave blohm replied:
now() is an ASP function as well.
<%
var_current_date_time = now()
%>
As far as the second issue..if you are going to have multiple people using your app at once, you don't want to display the next available ID number as it may be taken by another user before <i>this</i> user can submit their form...instead you should get and display the record's ID <i>after</i> you insert the record.
Hope this helps.
- Doc
Progress is made by the discontent.
<%
var_current_date_time = now()
%>
As far as the second issue..if you are going to have multiple people using your app at once, you don't want to display the next available ID number as it may be taken by another user before <i>this</i> user can submit their form...instead you should get and display the record's ID <i>after</i> you insert the record.
Hope this helps.
- Doc
Progress is made by the discontent.
Replied 17 May 2007 21:54:56
17 May 2007 21:54:56 Mike Leslie replied:
you can display date and time by using
< %= Now % > or < %= time % > < %= date % >
in your code for the proper form fields and put it on the page if you want. I dont think you can show the next available auto number but you can after its been created, on a confirmation of order page or in email sent to client.
< %= Now % > or < %= time % > < %= date % >
in your code for the proper form fields and put it on the page if you want. I dont think you can show the next available auto number but you can after its been created, on a confirmation of order page or in email sent to client.