Solved

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

Posted on 2007-03-22
3
246 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:mwmiller78
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:mwmiller78
ID: 18774703
very nice...thanx
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now