Obtain day of the week

1030
2
Jump to solution
05-28-2022 08:49 AM
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

2 Replies
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
BrittanyBurson
Occasional Contributor III

Perfect. Thank you!

0 Kudos