Hi friends, a have a little problem. Can somebody please tell me how can I format a datetime in a listview, I getting a long date from SQL Server 2008 when I fill my listview (date and time), but I only need a short date.
Sousa
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ramesh MaruthiRank #937 · 2.2K reputationPosted Jul 1, 2014, 6:13 AM EDT
Try in this way
Dim culture As CultureInfo = CType(CultureInfo.CurrentCulture.Clone, CultureInfo)
culture.DateTimeFormat.DateSeparator = "/"
culture.DateTimeFormat.ShortDatePattern = "dd/mm/yyyy"
Thread.CurrentThread.CurrentCulture = culture
Sousa Pambo92 reputationPosted Jul 22, 2014, 2:48 AM EDT
Thanks, it was for cSharpCorner, but i already solved.