How To save date and time value in date and time field in sugarcrm using before save logic hook ?

How To save date and time value in date and time field in sugarcrm using before save logic hook ?