Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Grids / September 2008

Tip: Looking for answers? Try searching our database.

Format dates in a grid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike W - 11 Sep 2008 20:07 GMT
How do you format a date time field so that just the date displays in the
cell as mm/dd/yyyy?  I've tried setting the format property for both the
column and text box to MDY and also tried D.  I've set the DateFormat
property of the textbox to 10-MDY.  I've tried setting sparse to both F and
T.  No matter what I do, the time is also showing up in the cell with the
date.
Fred Taylor - 12 Sep 2008 01:57 GMT
If what you've got is a DateTime field, you'll see that in the grid.  Sounds
like you should make the Column.ControlSource be ="TTOD(YourField)" and also
set the column.Sparse to .F..  Note that this will make the column ReadOnly,
so if you're using the grid for data entry, you'll have to create a date
type field and use that.

Signature

Fred
Microsoft Visual FoxPro MVP

> How do you format a date time field so that just the date displays in the
> cell as mm/dd/yyyy?  I've tried setting the format property for both the
[quoted text clipped - 3 lines]
> T.  No matter what I do, the time is also showing up in the cell with the
> date.
Mike W - 12 Sep 2008 13:52 GMT
Unfortunately the field is in a SQL table so I can't make it a date only field.
Bernhard Sander - 12 Sep 2008 15:06 GMT
Hi Mike,

> Unfortunately the field is in a SQL table so I can't make it a date only field.

In a remote view you can redefine this field so that (only) within foxpro it is
treated as date field. See "Properties" on the "Field" tab in the view designer.

Regards
Bernhard Sander
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.