﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Alejandro Quiroga Alsina</title>
    <description>My personal blog at DNNEnglish</description>
    <link>http://www.dnnenglish.com/Blog/tabid/72/BlogId/1/Default.aspx</link>
    <language>en-US</language>
    <webMaster>host@dnnenglish.com</webMaster>
    <pubDate>Mon, 06 Feb 2012 15:52:02 GMT</pubDate>
    <lastBuildDate>Mon, 06 Feb 2012 15:52:02 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.4.0.39853</generator>
    <item>
      <title>How to localize the Portal's Date</title>
      <description>&lt;p&gt;DotNetNuke displays the current date using a standard LongDateString formatting. It often happens that the user would have preferred another way to display the current date, but the standard customization provided by .NET sometimes is just not the best solution.&lt;br /&gt;
&lt;br /&gt;
After investigating a little the CURRENTDATE skin object, I have found that it is not really difficult to display the current date in any format.&lt;br /&gt;
&lt;br /&gt;
In order to format the date the way you want, you only need to edit the file "&lt;code&gt;CurrentDate.ascx.vb&lt;/code&gt;", which is stored inside the "&lt;code&gt;~/Admin/Skins&lt;/code&gt;" directory.&lt;br /&gt;
&lt;br /&gt;
Inside that file, look at the following code (and modify it to suit your needs):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;font color="#3333ff"&gt;Private Sub&lt;/font&gt; Page_Load(&lt;font color="#3333ff"&gt;ByVal&lt;/font&gt; sender &lt;font color="#3333ff"&gt;As&lt;/font&gt; System.Object, &lt;font color="#3333ff"&gt;ByVal&lt;/font&gt; e &lt;font color="#3333ff"&gt;As&lt;/font&gt; System.EventArgs) &lt;font color="#3333ff"&gt;Handles MyBase&lt;/font&gt;.Load&lt;br /&gt;
&lt;br /&gt;
    &lt;font color="#009900"&gt;' public attributes&lt;/font&gt;&lt;br /&gt;
    &lt;font color="#3333ff"&gt;If&lt;/font&gt; CssClass &lt;&gt; "" &lt;font color="#3333ff"&gt;Then&lt;/font&gt;&lt;br /&gt;
        lblDate.CssClass = CssClass&lt;br /&gt;
    &lt;font color="#3333ff"&gt;End If&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
    &lt;font color="#3333ff"&gt;Dim&lt;/font&gt; objUserTime &lt;font color="#3333ff"&gt;As New&lt;/font&gt; UserTime&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#009900"&gt;    ' ---{ I have added the following 2 lines }---&lt;/font&gt;&lt;br /&gt;
    &lt;font color="#3333ff"&gt;Dim&lt;/font&gt; sMonth() &lt;font color="#3333ff"&gt;As String&lt;/font&gt; = {"&lt;font color="#993300"&gt;Jan&lt;/font&gt;", "&lt;font color="#990000"&gt;Feb&lt;/font&gt;", "&lt;font color="#993300"&gt;Mar&lt;/font&gt;", "&lt;font color="#993300"&gt;Apr&lt;/font&gt;", _&lt;br /&gt;
                              "&lt;font color="#993300"&gt;May&lt;/font&gt;", "&lt;font color="#993300"&gt;Jun&lt;/font&gt;", "&lt;font color="#993300"&gt;Jul&lt;/font&gt;", "&lt;font color="#993300"&gt;Aug&lt;/font&gt;", _&lt;br /&gt;
                              "&lt;font color="#993300"&gt;Sep&lt;/font&gt;", "&lt;font color="#993300"&gt;Oct&lt;/font&gt;", &lt;/code&gt;&lt;code&gt;"&lt;font color="#993300"&gt;Nov&lt;/font&gt;", &lt;/code&gt;&lt;code&gt;"&lt;font color="#993300"&gt;Dec&lt;/font&gt;"}&lt;br /&gt;
&lt;br /&gt;
    lblDate.Text = objUserTime.CurrentUserTime.Day.ToString() _&lt;br /&gt;
        + "&lt;font color="#993300"&gt;,&lt;/font&gt; " + sMonth(objUserTime.CurrentUserTime.Month - 1) _&lt;br /&gt;
        + "&lt;font color="#993300"&gt;,&lt;/font&gt; " + objUserTime.CurrentUserTime.Year.ToString()&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#009900"&gt;    ' ---{ I have commented the following 5 lines }---&lt;br /&gt;
    'If DateFormat &lt;&gt; "" Then&lt;br /&gt;
    '    lblDate.Text = Format(objUserTime.CurrentUserTime, DateFormat)&lt;br /&gt;
    'Else&lt;br /&gt;
    '    lblDate.Text = objUserTime.CurrentUserTime.ToLongDateString&lt;br /&gt;
    'End If&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font color="#3333ff"&gt;End Sub&lt;/font&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
And that's it. Any comments/suggestions will be very welcome.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <link>http://www.dnnenglish.com/Blog/tabid/72/EntryID/1/Default.aspx</link>
      <comments>http://www.dnnenglish.com/Blog/tabid/72/EntryID/1/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.dnnenglish.com/Default.aspx?tabid=72&amp;EntryID=1</guid>
      <pubDate>Tue, 05 Aug 2008 15:11:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.dnnenglish.com/DesktopModules/Blog/Trackback.aspx?id=1</trackback:ping>
    </item>
  </channel>
</rss>
