Last post May 18, 2013 06:02 AM by phoenix414
Feb 27, 2006 10:00 PM|CaptEd|LINK
How do I post the currentdatetime (now) into a DateTime field in SQLserver using a formview? I tried a couple different techniques, but had problems with both:
1. TRY ONE: I created a date time field on the SQL server named entrydate. I can not figure out how to post the current datetime into it, without the user inputting it into a field.
2. Second TRY: I tried to change the datetime field on the sql server to a datetime stamp field, but it puts in a binary value. Then I can't read it correctly, and my delete functions don't work.
Feb 27, 2006 11:58 PM|StrongTypes|LINK
In the properties for the DateTime field in SQL server, set the default value of the field to GETDATE().
May 18, 2013 06:02 AM|phoenix414|LINK
I stumbled upon your anwser and tried it right away and here is what I found:
1. in MSSQL2008 if a value is asigned a timestamp as data type then you can't assign a default value or Binding.
2. when I changed it to type 'date' and did what you said. It changed it to: (getdate()) i reckon this won't do?
I didn't find out how to do this yet :( I'll keep looking