Get Text from string has format "dd/MM/yyyy" get wrong data output. ( the day number turn into month number and vice versa)

I have used Get text activity to get a string that in format “dd/MM/yyyy” and write into excel but the day number turn into month number and vice versa. How can i fix it?
And i used Write with DateTime.Now.ToString(“dd/MMM/yyyy”) and it always come with 0:00. How can i fix it?
Thanks you.
image
image
image
image

Buddy try this conversion while writing in cell buddy @plmtri.kddi

Datetime.Parseexact(out_Create.Substring(9).ToString,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMM-yyyy”)

kindly try this and let know whether this works or not buddy
Cheers

1 Like

Dear @Palaniyappan buddy,
I tried your solution but it giving a error like this.
String was not recognized as a valid DateTime.
I thought that i just want to write exactly as the string on the web site. Can i do that?

1 Like

buddy may i know at format we are getting from website and with what format you would like to enter buddy
@plmtri.kddi

Dear @Palaniyappan,
The website format is like in the picture, “dd/MM/yyyy”, and i want to write exactly like that but the Get text auto format is “MM/dd/yyyy” so when i write it turn to wrong.
image

ok no worries try like this buddy @plmtri.kddi

Datetime.Parseexact(out_Create.Substring(0,10).ToString,“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

edited buddy @plmtri.kddi

Cheers

Dear @Palaniyappan
This is the picture of the output excel file.
image
And the solution you gave me, i put it in assign like this?
image
Right?

1 Like

@plmtri.kddi
yes buddy is that working

1 Like

Dear @Palaniyappan buddy,
It work only on the first one and get error like this on the second and third.
Assign: The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar.
image

1 Like

Buddy check with format of second and third using a writeline activity once you get the value from get text, i think we need to know the formats of atleast three to four values of date, kindly check that and share the screenshot buddy @plmtri.kddi
we can sort this out, we are almost done
Cheers

1 Like

This is screenshot for the first one.
image
This is screenshot for the second one.
image
This is screenshot for the third one, the one that Get text activity clam that not Datetime format.
image
Thank you so much buddy @Palaniyappan.

Great buddy
what is the get text value of these, check with a write line activity to display it buddy we need that @plmtri.kddi
then we can easily sort thisout

1 Like

This is value of Get text Activities.
First one,
Create1
Second one,
Create2
Third one,
Create3
Thank you buddy @Palaniyappan

1 Like

@plmtri.kddi
buddy we thought we are getting in this MM/dd/yyyy, that is get text is changing theformat, but it didn’t and moreover we were getting that last error because we were mentioning the month first days second and that is not right format for Gregorian,
so use like this buddy
Datetime.Parseexact(out_Create.Substring(0,10).ToString,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

1 Like

hope you are not taking Create: along with the get text
right buddy @
only the dates

1 Like

Dear @Palaniyappan,
Yeah i only take the dates buddy,
Thank you very much, i will try this.

1 Like

Great
try and let know buddy whether it works or not

Cheers @plmtri.kddi

1 Like

Dear buddy @Palaniyappan,
i don’t know why but it not working :sweat_smile:

1 Like

Hi @plmtri.kddi,

Kindly check your system Date format.

1 Like

What was the error buddy ?
@plmtri.kddi

1 Like