Activity Forums Salesforce® Discussions How to get only Date from the field which is of DateTime type in Salesforce?

  • Piyush

    Member
    September 11, 2019 at 5:27 am

    Hi Nikita,

    you can use this to get only Date from the field which is of DateTime type in apex:-

    System.debug('date=' + Date.valueOf(System.now()));

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos