• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

Date Format (no 12:00:00AM) in ASP.NET(VB) from Access

I'm pulling data from an Access DB, and one of the fields is date. Here's my query:

select TargetCompany, ID, NextActionDate, NextAction from tblMain

the date is comin up as general format including the 12:00:00AM even though I set the format of this field to ShortDate in Access. I tried using FORMAT(Date, 101) AS Date but it didn't seem to like it. How do I get the date to display without the 12:00:00AM??


TIA
0
Mike Miller
Asked:
Mike Miller
1 Solution
 
kerryw60Commented:
might try...

Format(drDataRow("InspectDate"), "M/dd/yyyy")
0
 
craskinCommented:
are you displaying this in a gridview? if so, set DataFormatString="{0:d}" HTMLEncode="False" on the boundfield.
0
 
Mike MillerSoftware EngineerAuthor Commented:
very nice...thanx
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now