Forums
This topic is locked
Insert dates automatically in an Insert Record
Posted 27 Feb 2003 17:01:32
1
has voted
27 Feb 2003 17:01:32 framl wood posted:
Anyone know how I can insert the current date without the user knowing itso as I can use it as a filter in the Advanced Recordist Query, please!
Regards Frank
Replies
Replied 27 Feb 2003 17:17:24
27 Feb 2003 17:17:24 asp asp replied:
use this <%= Date()%> put it into a hidden field, looks like this
<input name="date" type="hidden" id="date" value="<%= Date()%>">
<input name="date" type="hidden" id="date" value="<%= Date()%>">
Replied 27 Feb 2003 17:17:32
27 Feb 2003 17:17:32 Owen Eastwick replied:
In Access, make the default value of the field Date() or Now(), in SQL Server use GETDATE().
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Regards
Owen.
-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm
Developer services and tutorials: www.drdev.net
Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Replied 28 Feb 2003 23:36:57
28 Feb 2003 23:36:57 Dennis van Galen replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
In Access, make the default value of the field Date() or Now(), in SQL Server use GETDATE().
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Frank, you can use this method also for updating records with default date:
www.dmxzone.com/go?4241
</CF_SelfAdvertisement> <img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>
with kind regards,
Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager
Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5
In Access, make the default value of the field Date() or Now(), in SQL Server use GETDATE().
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Frank, you can use this method also for updating records with default date:
www.dmxzone.com/go?4241
</CF_SelfAdvertisement> <img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>
with kind regards,
Dennis van Galen
DMXzone Manager
FAQ, Tutorial and Extension Manager
Studio MX / CFMX PRO / SQL 2000 / NT4 AND win2kPRO / IIS5