Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifyfing ssi scripts

Status
Not open for further replies.

cbenno

Technical User
Sep 18, 2002
4
0
0
AU
I want to put a last modified script on my page but the script i have puts the time on as well.
I would like to remove the time just leaving the date.
is this possible??
here is the script i am talking about.
<!--#flastmod file=&quot;art.shtml&quot; -->
It looks like this on the web
Tuesday, 24-Sep-2002 13:22:21 EST
 
we need to see the code in art.shtml, unless you can do something with DatePart() in your page.

Like

myYear = DatePart(&quot;yyyy&quot;, YourDateVariableHere)
myMonth = DatePart(&quot;m&quot;, YourDateVariableHere)
myDay = DatePart(&quot;d&quot;, YourDateVariableHere)

MyDate = myDay &&quot;/&quot;& MyMonth &&quot;/&quot;& MyYear

Response.Write=MyDate

Have a play with the above, you should be able to get it to work for you.

Cheech The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
Cheech, I think you are not right here. We don't need to see the code in art.shtml. FLASTMOD directive only includes last modification date of a document you specify. So here we only say &quot;What is the last modification date of file art.shtml&quot;.

cbenno, you need to use FMT attribute of the FLASTMOD directive. Something like
<!--#FLASTMOD FILE=&quot;file&quot; FMT=&quot;format&quot;-->

Where format can be:

Weekday:
%a - abbreviated weekday name
%A - full weekday name
Month:
%b - abbreviated month name
%B - full month name
%m - month as a decimal number (01 - 12)
Day:
%d - day of the month as a decimal number (01 - 31)
Year:
%y - year without century as a decimal number (00 - 99)
%Y - year with century as a decimal number
Hours:
%H - hour (24-hour clock) as a decimal number (00 - 23)
%I - hour (12-hour clock) as a decimal number (01 - 12)
%p - AM or PM associated with a 12-hour clock
Minutes:
%M - minute as a decimal number (00 - 59)
Seconds:
%S - second as a decimal number (00 - 61)
Example: %I:%M %p, %A, %B %d, %Y
Displays: Tuesday September 24 2002 Good Luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top