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

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

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

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

 

Expected CSV: Date 3-2-2020

Actual CSV:

Thanks in Advance

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

Expected CSV:

Date
3-2-2020

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

Thanks in Advance

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
Source Link
Keerthi
  • 3
  • 1
  • 4

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

Thanks in Advance