I am attempting to insert some records on a custom object that requires a value in the Time Received field, of type Time. Within an existing record (created manually) the value inside the detail page, as well as within a report, appears to be in HH:MM _M.

I have tried inserting the following permutations:

  • 5:33 PM
  • 5:33PM
  • 5:33:00 PM
  • 17:33
  • 17:33:00

I've been unable to find clear documentation on the specifics of inserting values to these fields via API. Their field type doc does not clearly explain how to insert without error.

up vote 1 down vote accepted

I was experiencing this same issue but managed to get the import to work by appending .000Z to the end of the hh:mm:ss format

As an example:

Start Time  End Time
14:00:00.000Z   16:00:00.000Z
14:00:00.000Z   16:00:00.000Z
14:00:00.000Z   16:00:00.000Z
14:00:00.000Z   16:00:00.000Z
14:00:00.000Z   16:00:00.000Z
12:00:00.000Z   15:00:00.000Z

Solution based on Salesforce article here

I have verified at my DE that Time format in csv 14:40:00 inserts the record correctly.

It shows as 2:40 PM on the record.

Time

  • Unfortunately this does not appear to work for me... i.imgur.com/KFTZQ5W.png – JaredT Jul 9 at 14:20
  • Better create a single record for testing purpose in Notepad++ or textpad and then try try to upload. Dont open the csv in Excel before loading. Let me know it that works – Santanu Boral Jul 9 at 14:25
  • I will give that a shot soon, unfortunately though not opening the file in excel is likely not an option as this file is sourced from the success file of another insert and slightly modified for upload. – JaredT Jul 9 at 14:26
  • Basically, you can clone the file in see in excel and for data loading purpose better to open the file in textpad or Notepad++. Sometimes, Excel corrupts the format. – Santanu Boral Jul 9 at 14:28

I will need to confirm it, but to best of my knowledge in data loader and any sort of API calls, you need to use full API format, i.e. 14:40:00.000 in your case.

I will work with our doc writer to clear this up in the docs. Thanks!

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.