Hello,
I am getting month in alphabets like bleow in excel
i need date in below format
2021-02-11
yyyy-MM-DD
how can i achieve this
i need to chnage in each row.
Hello,
I am getting month in alphabets like bleow in excel
i need date in below format
2021-02-11
yyyy-MM-DD
how can i achieve this
i need to chnage in each row.
outputstr=datetime.parseexact(input,“dd-MMM-yy”,system.globalization.cultureinfo.invariantculture).tostring(“yyyy-MM-dd”)
in the place of input your variable or value to be passed
DateTime.ParseExact(“11-Feb-23”,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
If you want to change the format of date in excel to another format by using the Format cell activity.
In Format cells activity give the range of rows you want to format the cells.
In set format you can select the category and Date format.
Check the below image for better understanding.
If you want to use with expression use the below
DateTime.ParseExact(CurrentRow("Start Date").toString,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yy")
Hope it helps!!
can you send the value which are passing
and one thing
leftside value should be of string type
outputstr=DateTime.ParseExact(Currentrow(“YourColumnName”).tostring,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
got it dont use get row item activity
if are not using for each row in datatable use for each row in datatable
and pass the value as Currentrow(“YourColumnName”).tostring
hope its helps
i need hyphen - in between is that possible using this format cell activity?
It will be with \ only if we will use the format cells activity.
i need - as per requirement
if it is date than how get ro item will take as a string
Sorry @Mathkar_kunal
It will change as per your required, If your local computer have the same format like date with hypen.
Hope you understand!!
convert that value to string
output of get row item activity as outputstr
pass it like
DateTime.ParseExact(outputstr.tostring,“dd-MMM-yy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
What is the datatype of FDate it should be string
one more thing in excel data is like below
when i am reading using get row item which is sdate it is as below
DateTime.ParseExact(outputstr.tostring,“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)
use this now
you will get your output