Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Date Format query
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 24 September 2006 :  16:48:05  Show Profile
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  Show Profile  Visit HuwR's Homepage
are you using the Snitz ChkDate function or your own ? the snitz chkdate function should display it in a user friendly format
Go to Top of Page

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 24 September 2006 :  17:13:01  Show Profile
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
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 24 September 2006 :  20:04:10  Show Profile
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)
Go to Top of Page

Helterskelter
Junior Member

United Kingdom
331 Posts

Posted - 25 September 2006 :  11:31:33  Show Profile  Visit Helterskelter's Homepage  Send Helterskelter an ICQ Message
I'm trying someting simular my self on an article page

What do i need to include to add the ChkDate function.

Helter

Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 25 September 2006 :  11:47:19  Show Profile  Visit AnonJr's Homepage
You need to include inc_func_common.asp to use chkDate.

Also, are you passing all the paramaters its expecting?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 25 September 2006 :  11:48:38  Show Profile  Visit HuwR's Homepage
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
Go to Top of Page

Helterskelter
Junior Member

United Kingdom
331 Posts

Posted - 25 September 2006 :  12:19:02  Show Profile  Visit Helterskelter's Homepage  Send Helterskelter an ICQ Message
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
Go to Top of Page

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 25 September 2006 :  19:28:52  Show Profile
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
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 25 September 2006 :  19:59:09  Show Profile  Visit AnonJr's Homepage
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?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 26 September 2006 :  03:30:59  Show Profile  Visit HuwR's Homepage
philsbbs,

you need to use ChkDate(rsTopicLoop("T_Date") , " At:" ,false)
Go to Top of Page

Helterskelter
Junior Member

United Kingdom
331 Posts

Posted - 26 September 2006 :  11:54:28  Show Profile  Visit Helterskelter's Homepage  Send Helterskelter an ICQ Message
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

Go to Top of Page

philsbbs
Junior Member

United Kingdom
397 Posts

Posted - 01 October 2006 :  15:40:15  Show Profile
resolved thats to HUWR

Phil
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.61 seconds. Powered By: Snitz Forums 2000 Version 3.4.07