Forums
This topic is locked
insert date
Posted 16 Oct 2002 07:13:08
1
has voted
16 Oct 2002 07:13:08 Sabina Ranjit posted:
Hi,I'm inserting date into a db field using <%=Date()%> from a form. However it inserts current time as well in 00:00:00 format. I want only the date without time.In the database I have it has a short date format, but when in the form the date shows up as Wed Oct 16 15:14:51 2002 , I just need it to be Oct 16 2002.
Can anyone help pls.
Thanks
Sabs
Replies
Replied 16 Oct 2002 07:53:54
16 Oct 2002 07:53:54 Dave Clarke replied:
If you are inserting the current date into the table you dont need to do it from a form, you can set a default value of DATE for the field in the database which will automatically add the current date to every new record.
As for displaying it how you want it on your web page, if you highlight the dynamic data on the page in UD then in the data bindings panel you will see it highlighted too, scroll across and you will see a dropdown menu "Format", in there are lots of different ways to format the data on your page.
hope that helps
Dave
ASP|VBScript|IIS5.1|WinXPPro & WinXPHome
As for displaying it how you want it on your web page, if you highlight the dynamic data on the page in UD then in the data bindings panel you will see it highlighted too, scroll across and you will see a dropdown menu "Format", in there are lots of different ways to format the data on your page.
hope that helps
Dave
ASP|VBScript|IIS5.1|WinXPPro & WinXPHome