I have one date string aa=2023-01-03, I need this date adjust one month before, EG. bb=2022-12-03, I use bb=string.Format(Cdate(aa).AddMonths(-1).ToShortDateString,“yyyy-MM-dd”), however, I get 2022/12/03, in fact , i need it’s value is 2022-12-03, who can help me, thanks.
Can you try this
Hi @Lori ,
Is this what you meant?
I think the issue is with using ToShortDateString.
You can dive the date formats in the array of strings in the below expression.
You just need to add the formats in the array if in case any other formats
@Anil_G @ashwin.ashok @Sudharsan_Ka
Thanks for your great help, Anil_G is the first, so I make Anil_G method as solution.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.