newInstanceGmt in Salesforce

Constructs a DateTime from the specified date and time in the GMT time zone.

Sample Code:

        Date Dt = Date.today();
        Integer yr = Dt.year();
        Integer mon = Dt.month();
        Integer dy = Dt.day();
        Datetime result = Datetime.newInstanceGMT(yr, mon, dy);

Leave a Reply