by VAD_Support » Fri Oct 09, 2009 2:07 pm
Where are you calling the NOW() function? If you're trying to insert the current date and time into a database, you should use the database syntax for that. For example, if you're using SQL Server, you should use GETDATE(). If you want to use NOW(), have in mind that the return value will be treated as a string, so if your database field is a datetime you will need to convert it. Also, the SQL statement should have quotes rounding the parameter.
For example, using GETDATE:
insert into TABLE (DateField) values (GETDATE())
Using NOW():
insert into TABLE (VarcharField) values ('{0}')
having a parameter with value NOW()
If you do not use quotes in the SQL statement, you will have a runtime error.
Let me know if this helps.