How to input datetime from excel to from web divided into 3 input fields?
Use Case Description
Thanks u for UiPath tutor, how to input datetime from excel to from web divided into 3 input fields, for example
from excel with format (DD-M-YYYY) to web format into Birthday: DD, Month : M, year: YY (Field by field) (into each field) ?
You may be used for each row in datatable or for each excel row activity to iterate the each row in the excel data.
Inside for each insert an assign activity and store the Birthdate column in a Variable and use the below syntax to extract the date, month and year after that you can use the Type into activities to enter those details in the fields.
Create a variable str_Date of type string and assing it the desired date (“MM/dd/yyyy”).
Create a variable dt_DateTime of type DateTime and assing it the following expression.
Datetime.ParseExact(str_Date,“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture)
If you want the Date into the separated fields then you need to apply the following format:
datetime_Variable.ToString(“dd”) → “05”
datetime_Variable.ToString(“dddd”) → “Thursday”
datetime_Variable.ToString(“MM”) → “12”
datetime_Variable.ToString("MMMM) → December
datetime_Variable.ToString(“yy”) → 19
datetime_Variable.ToString(“yyyy”) → 2019
NOTE: I am using a demo string date equals to “12/05/2019”