Gokion
March 16, 2022, 1:27am
1
Hi Guys,
I’m seeking your help to advise me why my Robot change date from Excel File.
I sent Excel to Robot = 01/06/2022 (DD/MM/YYY). If I check as Number format, it is “44713” (1-Jun-2022)
Robot input date in Application = 06/01/2022 ). If I check as Number format, it is “44567” (6-Jan-2022)
I would like to know why it happen? and How i can solve it.?
Thanks in advance.
try this
DateTime.ParseExact(yourdatevariable.toString, “MM/dd/yyyy”, Globalization.CultureInfo.InvariantCulture)
.ToString(“dd/MM/yyyy”)
or this
DateTime.ParseExact(yourdatevariable.toString(), “MM/dd/yyyy”, Globalization.CultureInfo.InvariantCulture)
.ToString(“dd/MM/yyyy”)
assuming the robot recognize the input as string and read the date as mm/dd/yyyy
then we need to do this to change the date output
Gokion
March 16, 2022, 2:36am
3
@Ahmad_Rais Thanks a lot for your advise.
Let me try it.
Gokul001
(Gokul Balaji)
March 16, 2022, 4:43am
4
Hi @Gokion
Ty this below expression
DateTime.ParseExact(ColumnNameOrIndex,("MM/dd/yyyy"),Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
Alternative Method
CDate(ColumnNameOrIndex).Tostring("dd/MM/yyyy")
MM/dd/yyyy is the Input Format
dd/MM/yyyy is the output format
For More Information about the Date Format
Hello Everyone,
I would like to present this post who are looking for the expressions related to the Date Format, String manipulation and LINQ
Basic of Date formatting
In this below topic, you will learn about Date Formats
Convert datetime to week of year
System.Globalization.CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(System.DateTime.Now, System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.CalendarWeekRule,System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.Fi…
Regards
Gokul