In this #C code convert datetime format into new format for £10
£10-20 GBP
已关闭
已发布大约 1 年前
£10-20 GBP
货到付款
I'm trying to transform a timestamp format from "3/2/2023, 8:30 am" to "2023-02-03 08:30" in #C. First person to message with the correct answer will get £10.
Here is my code.
GroupCollection groups = [login to view URL];
string field = groups["field1"].ToString();
DateTime res;
try
{
res = [login to view URL](field, "d/M/yyyy, h':'mm tt", [login to view URL]);
}
catch
{
return [login to view URL];
}
res = [login to view URL](new TimeSpan(0,0,0));
return [login to view URL]("yyyy-MM-dd HH':'mm");
Hello, I'm Abu Gosia.
I'm interesting in your project very well.
I'm good in C#, .Net Core, MVC, ASP.NET, Angular.js, Yii2, PHP, Laravel, Codeigneter, Wordpress, Open Cart.
I m quite well experienced in these jobs.
Let's go ahead with me.
Thanks
Hi
I have read your description carefully.
⭐
I have rich experiences in C# and C++ Programming
I worked on many similar projects.
I can guarantee the quality of the job.
Please kindly message me.
Thank you.
❤ C/C# EXPERT ❤
Thank you for posting
I am an C/C# developer with 10+ years of professional experience.
I have plenty of ability to carry out my work with high quality in time. What i want is good relationship with client and high quality , keep time promise.
Let's share our idea.
Looking forward to hear from you soon.
Best Regard.
The code seems to be trying to extract a "field1" group from a regular expression match "m", and parse it as a date time using the format "d/M/yyyy, h':'mm tt". Then it subtracts a time span of 0 days, 0 hours and 0 minutes from the result, and finally returns the string representation of the date time using the format "yyyy-MM-dd HH':'mm".
However, the code does not seem to be complete, as the regular expression match "m" is not defined. You would need to initialize it with a regex pattern that matches the input string format "3/2/2023, 8:30 am".
Hello, I have the solution for your query. Contact me and I'll give you the correct way. The conversion format should be like this
ToString("yyyy-MM-dd HH:mm")
Message me if I can help you