Hello,
As my title states, I need help converting from MM/DD/YYYY HH:MM:SS to YYYY-MM-DD format. Please help!
Thank you!
Hello,
As my title states, I need help converting from MM/DD/YYYY HH:MM:SS to YYYY-MM-DD format. Please help!
Thank you!
Hi,
Can you try the following expression?
DateTime.Parse(yourDateString).ToString("yyyy-MM-dd")
Regards,
Hi, thank you for your response! I have a follow up question - letβs say I will need to sometimes subtract this date -1day or -90 days, where I am pulling the number from the config file, how would I do it?
Hi,
Can you try to add .AddDays(-90) for eaxmple as the following?
DateTime.Parse(yourDateString).AddDays(-90).ToString("yyyy-MM-dd")
Regards,
What if the -90 value is being extracted from the config file as it needs to be customizable?
I am receiving an error when storing the value (-90) that I am extracting from config file into a string
Can you try as the following?
DateTime.Parse(dateTimeString).AddDays(CInt(in_Config("someKey").ToString)).ToString("yyyy-MM-dd")
It works, thank you so much!