I need to pass the date in “01/17/2019” and need to get back with the day’s info… In this case, i need to get the output like “Thu 01/17/2019”. I tried to do by Format value to get in the pattern… but it din work out. Is there any way to get the same? Ideas/solutions are welcome.
Thanks in advance.
Have you tried the following pattern “ddd MM/dd/yyyy”? now.ToString(“ddd MM/dd/yyyy”)
Thanks for your response, am aware of this formatting, The challenge here is its not today’s date. Whatever date it is passed, i need the value as mentioned… for eg… if i pass “05/15/2017” , the output should be “Mon 05/15/2017”.
Maybe it’s a misunderstanding and I do not understand the issue. The today’s date was only for testing the format.
If you pass “05/15/2017” then you only have to convert this string to a dateTime variable and apply the previous format. Am I omitting something?
Hope this could help you.
This is perfect !! Thanks a lot @Susana. I kept my variable as generic instead of DateTime. It worked!
Oh! That mistake happens to me a lot ! Glad to help you kk.virags
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.