Print Page | Close Window

change date format

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz NewsPad
Forum Description: Support forum for the Web Wiz NewsPad application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=25677
Printed Date: 29 March 2026 at 2:54pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: change date format
Posted By: edwinkort
Subject: change date format
Date Posted: 02 May 2008 at 8:52am
How can change the date: "friday 2 mei 2008" into 2-5-08 ?



Replies:
Posted By: TheBas
Date Posted: 06 May 2008 at 10:10am
In newsletter.asp you see the code:
<% = FormatDateTime(sarryNewsletter(2,0), vbLongDate) %>

Change "vbLongDate"

Here you see the different formats:

vbGeneralDate - 2/17/03 12:12:38 PM
vbLongDate - Monday, February 17, 2003
vbShortDate - 2/17/03
vbLongTime - 12:12:38 PM
vbShortTime - 12:12



-------------
- Theodor

Don’t run out of altitude and ideas all at the same time...!


Posted By: WebWiz-Bruce
Date Posted: 06 May 2008 at 10:46am
You can also change the locale the ASP application runs under. Have a look at the following page:-

http://www.webwiz.net/kb/asp_knowledgebase/date_time_settings.asp - http://www.webwiz.net/kb/asp_knowledgebase/date_time_settings.asp


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: edwinkort
Date Posted: 12 May 2008 at 10:56am

Thanks, but how change here the date format?

 'Loop through each of the XML RSS Feed items and place it in an HTML table
 For Each sarryRSSFeedItem In objRSSFeedItem
 
  'Web Wiz NewsPad RSS Feed Item childNodes
  '0 = title
  '1 = link
  '2 = description (post)
  '3 = pubDate
  '4 = guid (perminent link)
  '5 = WebWizNewsPad:pubDateISO (ISO international date)
       
  strHTML = strHTML & " <tr class=""tableRow"">" & _
  vbCrLf & "  <td>" & _
  vbCrLf & "   <li><strong><a href=""" & sarryRSSFeedItem.childNodes(1).text & """>" & sarryRSSFeedItem.childNodes(0).text & "</a></strong>" & _
  vbCrLf & "   <em> - " &  FormatDateTime(sarryRSSFeedItem.childNodes(5).text, 1) & "</em></li>" & _
  vbCrLf & "  </td>" & _
  vbCrLf & " </tr>"
 Next



Posted By: WebWiz-Bruce
Date Posted: 12 May 2008 at 11:13am
You would set the locale at the top of the file:-

Session.LCID = 2057

2057 is for UK, you would change the number to your own locale.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net