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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ramesh MaruthiPosted Jul 1, 2014, 10:13 AM
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 PamboPosted Jul 22, 2014, 6:48 AM
Thanks, it was for cSharpCorner, but i already solved.