I have added a custom field to leads, date_contacted with Data Type: Date .
Now when a new note is created for this lead I override the before_save hook and I want to put the current date in the date_contacted field of the lead.
I tried using gmdate("Y-m-d H:i:s") but when I check the date it shows as 2000-01-01 in the database. How do I format the date properly, or is there some sugar function that will create the date for me and take into account the users own date settings?
Thanks alot!


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks