Thank you but the problem is the TextBox (TB) is filled by the DataSet (DS)
field (it's not a stand alone TB).
The DataGrid is fiilled by a fooDS. The TB (physically separate from DG but
on the same form) is filled by the DataIn column of the fooDS (i.e. fooDS -
TableName.DataIn). The fooDS properly displays the date in the DG but, the
TB contains the date (thats in the DG) and a base time.
How do I get rid of the base time from the TB?
What I what to do is something like: fooDS - TableName.DataIn (mm/dd/yyyy)
"Malcolm" wrote:
I think you might also be able to use something like
myDateTime.ToShortDateString();
"MikeY" wrote:
Hi Steve,
Hope this exerpt from my code helps.
public void SetTime()
{
DateTime myDateTime = DateTime.Now;
// this.txtBoxOutput.Text = myDateTime.ToString("dddd MMMM dd hh:mm:ss");
this.txtBoxOutput.Text = myDateTime.ToString("dddd");
}
For the blocked out part of the code, you can see that you can manipulate
the desired part of the time/date/etc that you want.
MikeY
"Steve B." <St****@discussions.microsoft.com> wrote in message
news:6E**********************************@microsof t.com... Using: VS
dB: MS-Access
Although the the DataGrid displays the proper date from an Access file
(Date/Time DataType) an adjacent bound textbox for that same DataGrid
field displays the date and the time (e.g. 12/7/04 12:00 AM).
How do I get rid of the time from textbox and show only the date?
1. VS textbox Properties:
(DataBindings)-TextBox: fooDS - TableName.DataIn
2. I've chanded the DS schema to Date
3. Access Format for column says: mm/dd/yyyy
Steve