We help IT Professionals succeed at work.
Get Started

Display Datetime on classic ASP page

baxtalo
baxtalo asked
on
1,327 Views
Last Modified: 2012-08-14
On my classic asp page the time (e.g. 12:30) is displayed like this:

<%=FormatDateTime(rs("SunOut"),vbshorttime)%>

I'm trying to have the time displayed with the following code, but this returns the values like this: 1/1/1900 12:30:00 PM


<%If rs2.BOF and rs2.EOF then Response.Write "&nbsp;" Else response.write rs2.fields("SunIn") End If%>


How could I modify it in order to have the same results as with the vbshorttime example?

Thank you for your help
Comment
Watch Question
Top Expert 2004
Commented:
This problem has been solved!
Unlock 2 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE