Hello friends today we will discuss about Data and Date Time format into Salesforce with some sample code
Salesforce tutorials in Apex, Lightning Web Components, and Flow — plus honest career guidance for admins, developers, and job seekers trying to break into the ecosystem.
Hello friends today we will discuss about Data and Date Time format into Salesforce with some sample code
| DateTime dt = DateTime.now(); | |
| String dateTimeStr = dt.format('yyyy/MM/dd hh:mm:ss'); | |
| System.debug('>>>>' + dateTimeStr); |
| TEXT(MONTH(DATEVALUE(NOW())))+"/" +TEXT(DAY(DATEVALUE(NOW())))+"/" +TEXT(YEAR(DATEVALUE(NOW()))) & " " & | |
| MID(TEXT(NOW()-TZoffset), 12, 2) & ":" & | |
| MID(TEXT(NOW()-TZoffset), 15, 2) & ":" & | |
| MID(TEXT(NOW()-TZoffset ), 18, 2) |
No comments:
Post a Comment