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 ?

Parents
  • Hi Gupta,

    If you want to populate current date time value in date time field then we can achieve this by adding formula in date time field from studio.

    If you want to set date time field with any other value (other than current date time) then you have to write code in create.js file in respective module.

  • Hi All,

    I am trying to fetch date create/ date modified  from (any table) database using custom query query in sugarcrm entry point but accurate date not fetched using query.

    Exm. date_create-03-03-2020 03:23:45 (CRM Module display date created)

    but when i select to fetch this date using custom Query in sugarcrm date create mismatch

    so problem is that how we can fetch same date and time as crm create shows.

    Thanks 

    MG

Reply
  • Hi All,

    I am trying to fetch date create/ date modified  from (any table) database using custom query query in sugarcrm entry point but accurate date not fetched using query.

    Exm. date_create-03-03-2020 03:23:45 (CRM Module display date created)

    but when i select to fetch this date using custom Query in sugarcrm date create mismatch

    so problem is that how we can fetch same date and time as crm create shows.

    Thanks 

    MG

Children