Activity Forums Salesforce® Discussions How can we get time from Date Time field in Salesforce?

  • Kumar

    Member
    February 10, 2017 at 11:11 AM

    Hi Sushant,

    Try this formula, this works for any timezone (simply replace the +10 with whatever your timezone is relative to GMT):

    IF(
    ISBLANK(Departure_Date_Time__c ),"0",
    TEXT(MOD(VALUE(
    Left(
    right( trim(TEXT(Departure_Date_Time__c) ),9),2))+10,24))
    &":"&mid(right( trim(TEXT(Departure_Date_Time__c) ),9),4,2)
    )

    Replaced 'Departure_Date_Time__c' with your datetime field, hope this helps.

Log In to reply.

Popular Salesforce Blogs

Success Stories – How DemandBlue Helped Its Clients Improve Revenue Recognition with Salesforce Revenue Cloud Implementation

Blog in

Businesses that deal with subscription-based contracts, usage-based billing or other complex contracts face several difficulties in managing their billing cycle. Though Salesforce CPQ implementation does the heavy-lifting…

Popular Salesforce Videos