Author |
Topic  |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 24 September 2006 : 16:48:05
|
Hi,
I currently have the following code in topic.asp to display the topic date.
Response.Write ">" & CellFont & _ " <b>Topic: </b>" & _ rsTopicLoop("T_Subject") & "<br>" & _ " <b>Date : </B>" & _ rsTopicLoop("T_DATE")& "</font></td>"
Trouble is I want to replace :- rsTopicLoop("T_DATE")& "</font></td>"
with command similair to:- <% =ChkDate(rs("T_DATE")) %>
In order to display the date in a user friendly format.
How do I do it.
Current display gives :- Topic: An apology toPaul Eden Date : 20060102170415
Where as I want it to display:- Topic : An apology toPaul Eden Date : 6/16/2002 11:10:46 PM
Thanks in advance. |
Phil |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 24 September 2006 : 17:05:19
|
are you using the Snitz ChkDate function or your own ? the snitz chkdate function should display it in a user friendly format |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 24 September 2006 : 17:13:01
|
the snitz one, i just need to know how to code rsTopicLoop("T_DATE")& "</font></td>" to <% =ChkDate(rs("T_DATE")) %>
I can if it helps HuwR email you the file. |
Phil |
 |
|
laser
Advanced Member
    
Australia
3859 Posts |
Posted - 24 September 2006 : 20:04:10
|
You're saying it doesn't work when you use :
ChkDate(rs("T_DATE"))
??
In that case I'd assign the recordset field to a variable first. Like this :
strTopicDate = rs("T_DATE") ChkDate(strTopicDate) |
 |
|
Helterskelter
Junior Member
 
United Kingdom
331 Posts |
Posted - 25 September 2006 : 11:31:33
|
I'm trying someting simular my self on an article page
What do i need to include to add the ChkDate function.
Helter |
 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 25 September 2006 : 11:47:19
|
You need to include inc_func_common.asp to use chkDate.
Also, are you passing all the paramaters its expecting? |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 25 September 2006 : 11:48:38
|
inc_func_common.asp
the format for ChkDate is chkDate(fDate,separator,fTime)
wher fDate is the forum date, seperator is a string representing the characters to place between the date and the time, and fTime is a boolean value to tell it whether to display the time or not |
 |
|
Helterskelter
Junior Member
 
United Kingdom
331 Posts |
Posted - 25 September 2006 : 12:19:02
|
Thanks guys working perfectly now  I done this if it helps
Response.Write "<b>Posted on " & ChkDate(T_DATE, " At:" ,false) & "</b>" & vbNewLine & _ |
 |
Edited by - Helterskelter on 25 September 2006 12:24:37 |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 25 September 2006 : 19:28:52
|
I now have :-
Response.Write ">" & CellFont & _ " <b>Topic: </b>" & _ rsTopicLoop("T_Subject") & "<br>" & _ Response.Write "<b>Posted on " & ChkDate(T_DATE, " At:" ,false) & "</b>" & vbNewLine & _ But get http 500 errors
Please advise, I can email the file if that helps. |
Phil |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 25 September 2006 : 19:59:09
|
If you turn off friendly HTTP errors it should give you some more details about the problem - which will help immensely in troubleshooting.
Also, is T_DATE a part of your recordset or a variable? |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 26 September 2006 : 03:30:59
|
philsbbs,
you need to use ChkDate(rsTopicLoop("T_Date") , " At:" ,false) |
 |
|
Helterskelter
Junior Member
 
United Kingdom
331 Posts |
Posted - 26 September 2006 : 11:54:28
|
ChkDate(T_DATE, "&_nbsp;&_nbsp;At:" ,false)
My code has the &_nbsp but HTML turns it into a space
So try the code above but removing the _
Thats about the last thing i can think of |
 |
 |
|
philsbbs
Junior Member
 
United Kingdom
397 Posts |
Posted - 01 October 2006 : 15:40:15
|
resolved thats to HUWR |
Phil |
 |
|
|
Topic  |
|