All Collections
Page Targeting & Segmentation
Common questions
In what formats can I send my date attributes?
In what formats can I send my date attributes?
Learn what formats we accept when sending a user attribute as a date.
Met avatar
Written by Met
Updated over a week ago

Overview

When sending user attributes to UserGuiding, a common use case is to send dates, such as sign-up, subscription and cancellation date, and many others.

With these attributes, you could display a Promoter Survey to users who subscribed two weeks ago or show a Guide to newly subscribed users, for example.

Accepted formats

Please use one of the following formats when sending dates as user attributes.

//Sends date in YYYY/MM/DD format (most recommended since it is a
user-friendly format)

window.userGuiding.identify({
subscribed_at : "2022/01/25"
});


//Sends date in Unix Epoch format (milliseconds)

window.userGuiding.identify({
subscribed_at: 1626449677000
});


//Sends date in ISO format (there needs to be 'T' between date and time)

window.userGuiding.identify({
subscribed_at: "2022-01-25T15:00:00.008684+00:00"

//or without milliseconds/timezone

subscribed_at: "2022-01-25T15:00:00"
});
Did this answer your question?