is there a way to format the time so that it does not show seconds... i am using the formatdatetime() function... but it displays seconds in it... you can't customize the format like you can with the VB format() function
Printable View
is there a way to format the time so that it does not show seconds... i am using the formatdatetime() function... but it displays seconds in it... you can't customize the format like you can with the VB format() function
i found this article which i think will be really helpfull
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=48
good luck
that has nothing to do with formatting the date/time thoughQuote:
Originally posted by niske
i found this article which i think will be really helpfull
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=48
good luck
Code:dim todaysDate
todaysDate = now()
Response.write FormatDateTime(todaysDate,4)
ROFL. :DQuote:
Originally posted by kleinma
that has nothing to do with formatting the date/time though
sorry, guess i'm not really awake yet
i want to preserve the AM PM 12 hour clock though... formatting it using 4 gives you military time..Quote:
Originally posted by mendhak
Code:dim todaysDate
todaysDate = now()
Response.write FormatDateTime(todaysDate,4)
Picky, picky picky. :DQuote:
Originally posted by kleinma
i want to preserve the AM PM 12 hour clock though... formatting it using 4 gives you military time... Do it you stupid frog! I'll give you a big fat joint if you do it!!
Code:dim todaysDate
todaysDate = now()
Response.write FormatDateTime(todaysDate,4)
Response.Write "<BR>"
dim abc, def, ghi
abc = cstr(FormatDateTime(todaysDate,4))
def = mid(abc,1,instr(1,abc,":")-1)
ghi = cint(def)
if ghi > 12 then
ghi = ghi - 12
abc = replace(abc,def,cstr(ghi)) & " PM"
else
abc = abc & " AM"
end if
Response.Write "<BR><BR>" & abc
%>
how to show date n time in asp form that it will auto update the time every second without refreshing the form?
can show code?
You could use javascript for that.Quote:
Originally posted by hongge
how to show date n time in asp form that it will auto update the time every second without refreshing the form?
can show code?
I realize I'm probably beating a dead horse here, but..
Which will output hh:mm ttCode:Dim crntTime
crntTime = Left(Time,5) & Right(Time,3)