Hello,
i have dates format in like below - yymmdd
i need to convert each date in below format
01-Dec-25
how can i achieve this
Hello,
i have dates format in like below - yymmdd
i need to convert each date in below format
01-Dec-25
how can i achieve this
You can convert through ![]()
outputDate = DateTime.ParseExact(inputDate, “yyMMdd”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMM-yy”)
Or
DateTime.ParseExact(inputDate,“yyMMdd”,Nothing).ToString(“dd-MMM-yy”)
Happy Automation
Welcome to the Community
Please use this formula
=TEXT(DATE(2000+LEFT(A1,2), MID(A1,3,2), RIGHT(A1,2)), “dd-mmm-yy”)
Thanks & Happy Automations
If you have this data in an Excel use Format Cells activity to format the column to format - dd-MMM-yy
If you have this already in a string variable, use this LINQ
outputDate = If(String.IsNullOrWhiteSpace(inputDate),
inputDate,
If(DateTime.TryParseExact(inputDate, "yyyyMMdd",
Globalization.CultureInfo.InvariantCulture,
Globalization.DateTimeStyles.None,
dt),
dt.ToString("dd-MMM-yy", Globalization.CultureInfo.InvariantCulture),
inputDate))
getting below error
![]()
Try this
DateTime.ParseExact(inputDate.Trim, “yyyyMMdd”, CultureInfo.InvariantCulture)
Hi @Kamble_Shamaly
Use linq expression for the date format for your regarding issue,
dtInput.AsEnumerable().
ToList().
ForEach(Sub(r)
r(“DateCol”) =
DateTime.ParseExact(
r(“DateCol”).ToString,
“yyMMdd”,
System.Globalization.CultureInfo.InvariantCulture
).ToString(“dd-MMM-yy”)
End Sub)
Make it in assign and use it.
simplest way would be just click on Fix button over there or here is one liner
If(String.IsNullOrWhiteSpace(inputDate), inputDate, If(DateTime.TryParseExact(inputDate, "yyyyMMdd", Globalization.CultureInfo.InvariantCulture, Globalization.DateTimeStyles.None, dt), dt.ToString("dd-MMM-yy", Globalization.CultureInfo.InvariantCulture), inputDate))
Make sure you have these variables created
Test Output
as you need the format in excel use format cells activity and give the format you need
you dont need to read or use linq or anything
cheers
yes i did it and working only issue is we have much data like 1 lakh rows so taking time.
u have provided one more way
If you have this data in an Excel use Format Cells activity to format the column to format - dd-MMM-yy
here i i have not understood what is data in an excel use?
is it will convert whole column in one go?
please help on same
yes it would convert whole column in one go
in input give excel.sheet("Sheetname").Range("A:A") change A to any column you need
if for visual purposes then in excel formatting is to be changed
cheers
Try this
outputDate =
If(
inputDate.Contains(“-”),
DateTime.Parse(inputDate).ToString(“dd-MMM-yy”),
DateTime.ParseExact(inputDate, “yyyyMMdd”,
System.Globalization.CultureInfo.InvariantCulture
).ToString(“dd-MMM-yy”)
)
i need below format
01-Dec-25
Select the category as Custom and then use this format - dd-MMM-yy
Use this expression to convert yyyyMMdd → dd-MMM-yy:
DateTime.ParseExact(er_create, “yyyyMMdd”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMM-yy”)
Example: 20251201 → 01-Dec-25.
Your value is in yyyyMMdd format (example: 20251201).
Use this expression:
DateTime.ParseExact(dateStr, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture) _
.ToString("dd-MMM-yy")
Example:
2025120101-Dec-25
Use this in Assign / Write Cell / Output where dateStr is your string.
Regards,
Gokul