InsertCommand .NET Date
So, i have been messing with .NET more and more. Just wanted to make a note just in case there is another developer out there looking for this solution. So the problem was i needed to place a date into the database but had no idea. So in the “asp:SqlDataSource” i edited the InsertCommand.
InsertCommand="INSERT INTO [rev1_posts] ([subject], [email], [body], [status], [created_at]) VALUES (@subject, @email, @body, 1, getdate())"
Note i added “getdate()” to grab the current date. Simple i know but it took me some time to find the solution.


