Taking values from Excel variables

image

i have two columns wherein I have named them as Name and Values

Need help how to get total time value using Excel

HI
welcome to uipath community
hope this expression would help you

–get the datatable from excel with EXCEL APPLICATION SCOPE and READ RANGE activity with a variable named dt
–now once after that use a write line activity and mention like this
dt.Rows(0)(1).ToString+" “+dt.Rows(1)(1).ToString+”:"+dt.Rows(2)(1).ToString

Cheers @Farha

Hi,
i wanted result as “16Oct20190325”

1 Like

Fine
then expression be like

edit:
dt.Rows(0)(1).ToString+dt.Rows(1)(1).ToString+dt.Rows(2)(1).ToString

Cheers @Farha

Hi @Palaniyappan ,

I m getting the Below result
Hournow.ToString(“HH”)

Thanks & regards
Farha

1 Like

aaha…wait wait
got it
dt.Rows(0)(1).ToString+dt.Rows(1)(1).ToString+dt.Rows(2)(1).ToString

Cheers @Farha

Hi @Farha,

The below formula will give you the current date with time in the cell where you placing it.

=NOW()

@Palaniyappan
Still not the same answer
now.ToString(“ddMMMyyyy”)now.ToString(“HH”)now.ToString(“mm”) is result I got

I need it in UiPath Output as 16Oct0424

If you need the same directly in UiPath you can use System.DateTime.Now.Date.ToString.

If you need to update it in excel then have to get it in UiPath then update the excel cell with “=Now()” and read that cell using excel application scope and read cell.

Hi Farha,

Welcome to the community

Assing Date = now.Tostring(“dd/MM/yyyy”)
Assing Hour = now.Tostring(“HH”)
Assing Minutes = now.Tostring(“mm”)
Total
Assing Total = Date+" “+Hour+”:"+Minutes

That can be used inside for each row like with excel activity and read range

test

Hi @Farha,

When you read the info from excel you will get for example: “now.ToString(“ddMMMyyyy”)” which makes the Now as string and that makes the function not a function. You might be able to if you only read the “ddMMMyyyy” and input that into a function inside uipath like this now.ToString(variable)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.