Solved

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

Posted on 2007-03-22
3
249 Views
Last Modified: 2008-02-26
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
Comment
Question by:Mike Miller
3 Comments
 
LVL 6

Expert Comment

by:kerryw60
ID: 18774109
might try...

Format(drDataRow("InspectDate"), "M/dd/yyyy")
0
 
LVL 12

Accepted Solution

by:
craskin earned 500 total points
ID: 18774605
are you displaying this in a gridview? if so, set DataFormatString="{0:d}" HTMLEncode="False" on the boundfield.
0
 

Author Comment

by:Mike Miller
ID: 18774703
very nice...thanx
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question