Obtain day of the week

119
1
Jump to solution
a month ago
PamelaLandy
Occasional Contributor

Hi, everybody In survey connect , Is it possible to obtain and save the name of the day that has been obtained from a date type  DateTime ? 

thanks in advanced

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Gerhard
New Contributor III

Hi @PamelaLandy,

The way I'd tackle this is using the format-date-time function which allow you to convert date objects into strings. There's more info in the Dates and Time in Survey123 - Esri Community blog post, but I've taken the table below from that post and modified it to return just the three letter short text day (Sun, Mon, ...).

 

typenamelabelcalculation
dateTimewsdatetimeSample Date/Time 
calculatewstimeTimeformat-date(${wsdatetime},'%a')

 

Best,

Gerhard

View solution in original post

0 Kudos
1 Reply
Gerhard
New Contributor III

Hi @PamelaLandy,

The way I'd tackle this is using the format-date-time function which allow you to convert date objects into strings. There's more info in the Dates and Time in Survey123 - Esri Community blog post, but I've taken the table below from that post and modified it to return just the three letter short text day (Sun, Mon, ...).

 

typenamelabelcalculation
dateTimewsdatetimeSample Date/Time 
calculatewstimeTimeformat-date(${wsdatetime},'%a')

 

Best,

Gerhard
0 Kudos