How to get date data in excel to put in in-house system?

Hi, i am currently having a project which need to get the date from excel to put in in-house system.The date in the in-house system is shown as the first photo. It can click on the month and type the month,same to day and year .So the problem i having now is how to get the date from excel to fill into the in-house system.

Hy @Chien_En,

Could you share a sample excel file so I can take a look?
Extract dates can be a bit challenging because of format


1 Like

Here is the example format of date its same with the inhouse system which is mm/dd/yyyy

Is it possible to set it seperately like month,date,year as seperate variable?

I assume that you have read the spreadsheet data into some sort of datatable.

Looping over each row in the table you can parse the Po Date by doing something like: Datetime.ParseExact(row(0).ToString, “M/d/yyyy”, nothing)

This will parse your string into a datetime which you then can parse back: date.ToString(“MM/dd/yyyy”)

Note the distinction between “M” and “MM”. A single M will not force a leading 0, the same is true for a single d.

Do u have code example ??

The code is there, friend.

You need a Read range to read the data out into a Datatable variable.
Then iterate over each row and for each row you have an assign that convert text to date, then af SetText/Assign/whatever to parse the date back into a string.