How to pass Date Time Values in CleverTap


#1

Here are the formats for Date object that you need to use for Events/User properties if you are pushing them via SDK:

Android: new java.util.Date()
iOS: [NSDate date]
Website: new Date()
API: "$D_epochValueInSeconds

If you are using CSV upload feature on the dashboard to push user properties then you need to use the following formats for date-time values:

Using CSV upload, we support uploading date formats of the following types. All other formats will be treated as String

  1. dd/MM/yyyy HH:MM:SS
  2. MM/dd/yyyy HH:MM:SS
  3. yyyy/dd/MM HH:MM:SS
  4. yyyy/MM/dd HH:MM:SS
  5. dd MMM yyyy HH:MM:SS
  6. $D_epoch
  • If HH:MM:SS are not added, we will default the time to 12:00:00
  • Dates are supported in 24-hour format
  • If you are uploading a date, the header should mention the name of the property followed by the date format in angular brackets. This format is case sensitive. Please use the exact case as mentioned above (MM in capital, etc.)

Example:- Purchase Date <dd/MM/yyyy HH:MM:SS>
Sale Date