How to input datetime from excel to from web divided into 3 input fields?

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) ?

AS-IS WORKFLOW, TO-BE WORKFLOW

NewEmployees.xlsx

Other information about the use case

Industry categories for this use case: Banking, Insurance

Skill level required: Beginners

UiPath Products that were used: UiPath Studio, UiPath StudioX

Other applications that were used: Excel

Other resources: Learn RPA on Youtube!

What is the top ROI driver for this use case?: Accelerate growth and operational efficiency

Hi @bayu.herlambang ,

Thanks for reaching out UiPath Community.
you can follow below steps.

  1. get date from excel
    2.Split date in DD MM and YY
    3.enter each values to your input field

Hope this works for you.
Happy Automation,
@Vinit_Kawle

1 Like

Hi @bayu.herlambang

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.

- Assign -> BirthDate = CurrentRow("Birthdate")

- Assign -> Date_Var = DateTime.ParseExact(BirthDate,"d-M-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("dd")

- Assign -> Month_Var = DateTime.ParseExact(BirthDate,"d-M-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("MM")

- Assign -> Year_Var = DateTime.ParseExact(BirthDate,"d-M-yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString("yyyy")

Note - All variables is in string datatype only

Check the below image for better understanding,

I have taken the first row Input value from your Input Excel - 19-2-1969

Workflow -

output -
image

Hope it helps!!

Hi bayu.herlambang,
Please, folow the steps as below:

  1. Create a variable str_Date of type string and assing it the desired date (“MM/dd/yyyy”).
  2. 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)
  3. 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”

Cheers,

Thanks for u answer, this so helped