Activity Forums Salesforce® Discussions What is the purpose of using Datetime.dateGMT() function in Salesforce?

  • PRANAV

    Member
    September 29, 2016 at 5:31 am

    Hi Mohit,

    DateTime: A value that indicates a particular day and time, such as a timestamp.

    Date: A value that indicates a particular day. Unlike Datetime values, Date values contain no information about time.

    DateTime.dateGmt(): This function returns the Date component of the GMT representation of the exact moment in time represented by the DateTime.

    In contrast, DateTime.date() returns the Date component of the context's user's timezone's representation of the DateTime.

    Hope this helps you.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos