Products

Solutions

Learn More

Partners

Community

Blog

About

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...change default date formatchange default date format
Previous
 
Next
New Post
11/21/2016 5:32 AM
 

Hello,

I know date format depends on the culture code selected (selecting a different language).

In event viewer, if i'm in spanish it shows like this:


I'm searching the file where dnn core specifies that date format, i guess every language pack has a file where it stores that date format, maybe i'm wrong.

What i want is that date format to be shown as YYYY/MM/DD instead of DD/MM/YYYY (es-ES) or MM/DD/YYYY (en-US).

 

Thanks in advance.


 
New Post
11/21/2016 6:13 AM
 

Carlos,

the date format is not defined in a language pack, but in the .Net framework.

A quick and dirty solution (but this will be changed back after an update, so you have to redo it again): Edit the file /DesktopModules/Admin/LogViewer/logviewer.ascx, and change the lines that display the date (in the ItemTemplate and in the AlternatingItemTemplate, ~ lines 100 and 116) from

<div><%# DataBinder. Container.DataItem,"LogCreateDate") %></div>

to

<div><%# string.Format("{0:yyyy'/'MM'/'dd hh':'mm':'ss}", DataBinder. Container.DataItem,"LogCreateDate")) %></div>

Happy DNNing!
Michael


Michael Tobisch
DNN★MVP
helferlein.com - Michael Tobisch's Site about DNN, SQL Server, ASP.Net and other related stuff dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...change default date formatchange default date format


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out