If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > date format

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-15-04, 20:34
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
date format

I'm using FormatDateTime with vbLongDate in the following line:

<%=FormatDateTime((rsBlogEntry.Fields.Item("blogDa te").Value), vbLongDate)%>

Which returns the format:
Wednesday, September 15, 2004

I was looking at the different date formats and couldn't find one that drops the day and just returns:

September 15, 2004

Is there a way to format the date this way? Thanks.
-Dman100-
Reply With Quote
  #2 (permalink)  
Old 09-22-04, 19:44
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
byo - build your own.... unfortunately... try this...
Code:
Function FormatDmanDate(myDate)
  Dim sMonth, sDay, sYear, tmpDate
  sMonth = MonthName(Month(myDate), false)
  sDay = Day(myDate)
  sYear = Year(myDate)
  tmpDate = sMonth & " " & sDay & ", " & sYear
  FormatDManDate = tmpDate
End Function
should be close hopefully....
Reply With Quote
  #3 (permalink)  
Old 09-24-04, 11:15
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Or you could split the original on the coma/space..

Code:
Dim newDate, dateArray
newDate = FormatDateTime((rsBlogEntry.Fields.Item("blogDate").Value), vbLongDate)

dateArray = Split(newDate, ", ")
newDate = dateArray(1) & ", " & dateArray(2)
Or go from the first occurance of the coma/space

Code:
Dim newDate
newDate = FormatDateTime((rsBlogEntry.Fields.Item("blogDate").Value), vbLongDate)

newDate = Mid(newDate, InStr(newDate, ", "), Len(newDate))
Many ways to skin a cat!
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On