simple date insert question

I know this is easy, but I can’t find the answer and it’s driving me crazy…

How do I insert a date in a datetime field?

For example, I have a datetime field bidcreationdate:

To insert the current datetime,

bidcreationdate = new Date()

doesn’t seem to work, nor does

var x = new Date()
bidcreationdate = x

Thanks,

Andrew

Something like

aDateField = new Date()

works. So in your case there is some other problem. What do you mean by “doesn’t seem to work”? What happens?

I’m sorry – it does work. I just came back to delete the post but you had already responded. I just needed to save the record.

A little off-topic: I prefer to use application.getServerTimeStamp() because users do nasty things with clients clocks, this way you are sure that the date entered is correct, even if your users are on different time zones or if they tampered the client’s clock.