Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListXSL - ms:format-date / ms:format-timeXSL - ms:format-date / ms:format-time
Previous
 
Next
New Post
8/16/2012 3:26 PM
 

Hello..
In the process of getting a date/time column to display a date in multiple formats, I found the ms:format-date and ms:format-time functions.  These work except the time is defaulting to UTC time once they're formatted.

E.g.  If I have the date/time entered in the form as August 16, 2012 @ 4:35pm, the default display and what is entered into the database is 2012-08-16T16:35:00-04:00.

But if I try to change the format of a date column (see below), the time of this field gets changed to UTC.
<xsl:value-of select="ms:format-date(udt:Expiration_x0020_Date, 'dddd, MMMM d, yyyy')" disable-output-escaping="yes" /> will display the proper date (Thursday, August 16, 2012) as long as it's time isn't greater then 8:00pm.  So if I enter the date/time as August 16, 2012 @ 8:35pm, the formatted display date will be Friday, August 17, 2012 instead of Thursday, August 16, 2012.

Same goes for the time; if I want to custom format the time.  Using the 16:35:00-04:00 entered time above:
<xsl:value-of select="ms:format-time(udt:Expiration_x0020_Date, 'hh:mm:sstt')" disable-output-escaping="yes" /> will display the time as 8:35:00pm instead of 4:35:00pm.

Anyone know how I can quit this from occurring and still allow me to format the date/time as I see fit?

Thanks..

 
New Post
8/16/2012 3:30 PM
 

Sometimes, you have to google a little further to figure out the issue.  UGH..

<xsl:value-of select="ms:format-time(substring(udt:Expiration_x0020_Date, 1, 19), 'hh:mm:sstt')" disable-output-escaping="yes" />

Will display the properly entered time value; 4:35:00pm in the above example.  We're good to go.

Thanks for looking at my issue..


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListXSL - ms:format-date / ms:format-timeXSL - ms:format-date / ms:format-time


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