Skip to main content
2 of 2
added 29 characters in body
sfdcfox
  • 501.8k
  • 21
  • 473
  • 828

CSV File Date Issue

Can anyone help me with this?. How to extract the time from the date field and also the date format while creating the CSV file in the batch class. Please find the below code.

String fileRow = '';
fileRow = fileRow ',' +Date field

Actual CSV:

Date
2/3/2020 12:00:00 AM

Expected CSV:

Date
3-2-2020
Keerthi
  • 3
  • 1
  • 4