Announcements
Hi Everyone,
I am trying to use only Date from the DateTime field ("Created on" field). I am using the below C# code:
"string date = targetEntity.FormattedValues["createdon"].ToString();"
But it is giving the time also along with the date, how can I remove the time or how can I fetch only the date?
Hi Tarun,
You can use DateTime.ParseExact(string s, string format, IFormatProvider? provider) to convert into a date-only format.
(+) C# code to convert string to date without time - Microsoft Dynamics CRM Forum Community Forum
Thank you, Leah Ju.
Hi Partner,
Can you click Yes under "Did this answer your question?" to close this thread if my answer is helpful.
Thanks in advance!:)
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 51 Super User 2026 Season 1
Muhammad Shahzad Sh... 51 Most Valuable Professional
Nagaraju_Matta 50