小白Salesforce--用Data Loader 处理Datetime型数据

在用Dataloader导入数据时,对于DateTime格式的数据,考虑到时区和格式的问题,要做些简单处理.

Date Formats
We recommend you specify dates in the format yyyy-MM-ddTHH:mm:ss.SSS+/-HHmm:

  • yyyy is the four-digit year
  • MM is the two-digit month (01-12)
  • dd is the two-digit day (01-31)
  • HH is the two-digit hour (00-23)
  • mm is the two-digit minute (00-59)
  • ss is the two-digit seconds (00-59)
  • SSS is the three-digit milliseconds (000-999)
  • +/-HHmm is the Zulu (UTC) time zone offset

The following date formats are also supported:

  yyyy-MM-dd’T’HH:mm:ss.SSS’Z’

  yyyy-MM-dd’T’HH:mm:ss.SSS Pacific Standard Time

      yyyy-MM-dd’T’HH:mm:ss.SSSPacific Standard Time

  yyyy-MM-dd’T’HH:mm:ss.SSS PST

  yyyy-MM-dd’T’HH:mm:ss.SSSPST

  yyyy-MM-dd’T’HH:mm:ss.SSS GMT-08:00

  yyyy-MM-dd’T’HH:mm:ss.SSSGMT-08:00

  yyyy-MM-dd’T’HH:mm:ss.SSS -800

  yyyy-MM-dd’T’HH:mm:ss.SSS-800

  yyyy-MM-dd’T’HH:mm:ss

  yyyy-MM-dd HH:mm:ss

  yyyyMMdd’T’HH:mm:ss

  yyyy-MM-dd

  MM/dd/yyyy HH:mm:ss

  MM/dd/yyy

以下是我转换Datetime数据的过程,因为在中国,时区应该在GMT基础上+8小时

 

posted @ 2017-03-14 17:10  wicky666  阅读(741)  评论(0编辑  收藏  举报