DateStamp - MS-SQL

Results 1 to 2 of 2

Thread: DateStamp - MS-SQL

  1. #1
    Glen Guest

    Default DateStamp - MS-SQL

    using ms-sql 7, in the same way you might use an &#039autonumber&#039 (identifier) is there a way of getting ms-sql to insert a datestamp when a record is created?<BR><BR>i&#039ve noticed a var type of &#039datastamp&#039 but all it appears to insert is &#060;Binary&#062; --i&#039m looking to insert a simple datestamp string of: "01 Oct 1999"<BR><BR>thanks

  2. #2
    Jairo Guest

    Default RE: DateStamp - MS-SQL

    Glen,<BR>Create an ordinary datetime field, let&#039s say date_created.<BR>Use a DEFAULT on that field as getdate(). That will set it automatically each time an INSERT is executed on that table. Keep in mind that is for INSERT. Any subsequent UPDATES are not handled here.<BR><BR>HTH,<BR>Jairo<BR>http://www.citywebarchitects.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •