Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 27th, 2005, 02:34 PM
Authorized User
 
Join Date: Mar 2004
Location: Maumee, OH, USA.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default Manipulating DataColumn

I'm retrieving data from an ODBC data souce. One of hte fields is a date field however, when I show it in a datagrid it is also displaying a time stamp.

Anyway I can get just the date? I've tried setting the column type to "String" but no luck. I've also tried to return just the date portion to the column but it still tacks on the time portion. Any/all suggestions are appreciated. Thanks.
Reply With Quote
  #2 (permalink)  
Old January 28th, 2005, 12:11 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Perhaps using the TO_CHR(<fld>, 'dd-mon-yyyy') (substituting the particular formatting characters for what you are after) function (or TO_CHR()’s equivalent in your RDBMS) in the SQL to get the DBMS to return just the part you want.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field not a DataColumn or DataRelation flashmanTom SQL Server 2005 0 January 30th, 2008 09:55 AM
Field not a DataColumn or DataRelation flashmanTom Visual Studio 2005 0 January 26th, 2008 02:50 PM
DataColumn.Expression problem shalan ADO.NET 0 October 4th, 2007 01:53 PM
DataColumn .Unique property not being set gp_mk ADO.NET 3 November 4th, 2004 06:50 AM
copy datacolumn from one dataset to another hkpanda ADO.NET 1 July 25th, 2003 12:04 PM



All times are GMT -4. The time now is 12:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.