Error in the date and time for the outloook calender

Hi guys,

I am trying to send around 50 mail for meeting request from Outlook. Please check the excel range for the data and time.

But every time I get the error for the DateTime.I tried many formulas for the start and time and its always showing some error.
Can someone please help to write the correct formula in the start and end time. Which is will combine two cells. Date and time.

Please check the screenshot for the excel range and also for the error message in the path.

Thanks

image
image

Hi @Vijayakumar_Arumugam you have not shared Error screenshot, can you please insert it

Sorry ,

Please check the error message

This is the formala its in the activity Convert.ToDateTime(row(5).ToString).I dont know what to write to combine two cells.I tried differrent method but its not working

@Vijayakumar_Arumugam Basically problem is when converting date. Can you please share the expression you used for conversion

1 Like

Hi,

here is the expression

But i dont think its correct .Could you please let me know the correct expression

Convert.ToDateTime(row(5).ToString)

Thanks

@Vijayakumar_Arumugam Can you also share what value tou are getting in row(5).ToString.

1 Like

image

Please check the attached image and start time should be row 4 and row 5,and end time should be row 6 to row 7

Thanks

Hi @Vijayakumar_Arumugam,
Earlier when you had shared the screenshot date format was different MM/dd/yyyy and in the latest screenshot it is dd/MM/yyyy.
Which needs to be considered and could you please share the output of row(4).ToString and row(5).ToString either in mesaage box or log message

1 Like

@ Vijayakumar_Arumugam
You have to convert row 4 and row 5 separately for ex.

convert.ToDateTime(row(0).ToString).ToDateString :- Date Column
convert.ToDateTime(row(1).ToString).ToShortTimeString :- TimeColumn

and concatenate result:
convert.ToDateTime(row(0).ToString).ToShortDateString +" "+convert.ToDateTime(row(1).ToString).ToShortTimeString

1 Like

HI @Arpit_Kesharwani,

Sorry for the mistake .Could you please wotk dd/mm/yy.

Please check the photo for the output.My output for time is differernt format .eventhough my excel format is time

image image
image

Hi @Lakshay_Verma,

I try with the expression you wrote here .

I am getting another error.


image

Hi @Vijayakumar_Arumugam,

Use Preserveformat while reading data
image

Convert.ToDateTime(row(4).ToString,System.Globalization.CultureInfo.GetCultureInfo(“hi-IN”).DateTimeFormat) for Date
Convert.ToDateTime(row(5).ToString For time

Because this is string, your argument need date and time use below code

Cdate(convert.ToDateTime(row(4).ToString).ToShortDateString +" "+convert.ToDateTime(row(5).ToString).ToShortTimeString)

Also you need to make sure below settings

Hi @Lakshay_Verma and @Arpit_Kesharwani,

I tried both solutions but it didn’t work.

Thi sis the error message I got.

I also attachment my workflow and excel file:i also tried to combine date and time in the excel file .Please check the excel file.

TEXT MAIL.xlsx (13.4 KB) Main.xaml (7.4 KB)

@Vijayakumar_Arumugam

Please use this as argument

cdate(DateTime.ParseExact(row(4).ToString,“dd/MM/yyyy”,system.Globalization.CultureInfo.CurrentCulture).ToShortDateString+" “+cdate(row(5).ToString).ToShortTimeString)
cdate(DateTime.ParseExact(row(7).ToString,“dd/MM/yyyy”,system.Globalization.CultureInfo.CurrentCulture).ToShortDateString+” "+cdate(row(8).ToString).ToShortTimeString)

1 Like

@Vijayakumar_Arumugam Working one, I removed for each loop please add it and change your variable accordingly and mark it as a solution
Main.xaml (8.5 KB)

1 Like

sorry @Arpit_Kesharwani i can able to open your xaml file.Could you please send the screeshot for your process

@Vijayakumar_Arumugam I have changed
Start Time Convert.ToDateTime(row(6).ToString,System.Globalization.CultureInfo.GetCultureInfo(“hi-IN”).DateTimeFormat)

End Time
Convert.ToDateTime(row(9).ToString,System.Globalization.CultureInfo.GetCultureInfo(“hi-IN”).DateTimeFormat)

1 Like

HI @Arpit_Kesharwani and @Lakshay_Verma

This is the result I get when I used both of your expression