Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - change date format
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedchange date format

 Post Reply Post Reply
Author
edwinkort View Drop Down
Newbie
Newbie


Joined: 02 May 2008
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote edwinkort Quote  Post ReplyReply Direct Link To This Post Topic: change date format
    Posted: 02 May 2008 at 8:52am
How can change the date: "friday 2 mei 2008" into 2-5-08 ?
Back to Top
TheBas View Drop Down
Newbie
Newbie


Joined: 26 April 2008
Location: Norway
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote TheBas Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
edwinkort View Drop Down
Newbie
Newbie


Joined: 02 May 2008
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote edwinkort Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.