Get only date from date and time

Hi Ravi,

You can use assign activity to get only date from date time format.

Option 1 - Date Time is already in string variable

string sDateTime = 27/10/2020 05:52:13
string sDate= Split(sDateTime)(0)

Option 2 - Date and Time is available in DateAndTime variable of type DateTime.

string sDate = DateAndTime.ToString("dd/MM/yyyy")

Hope this helps.

1 Like