Click to See Complete Forum and Search --> : Formatting dates in MSFlexGrid


Jack Shainsky
September 21st, 1999, 05:05 AM
Hello!

I've used DBGrid for displaying results of a query from an Access database. Now I need to use for this purpose MSFlexGrid. I made all changes in code, but in date fields MSFlexGrid displays dates in date + time format. I failed to find how can I change format of these fields either in MSFlexGrid or in query. Can somebody suggest a solution?

Thank you in advance,

Jack.

Dr_Michael
September 21st, 1999, 05:29 AM
One of my old replies (check it):
http://www.codeguru.net/bbs/wt/showpost.pl?Board=vb&Number=5890&Search=true&Forum=vb&Words=dtpicker&Match=Whole&Topic=&Searchpage=0&Limit=25

Michael Vlastos
Automation Engineer
Company Modus SA
Development Department

santulan
September 21st, 1999, 05:58 AM
Jack,

To format any date in msflexgrid use the following statement - (Modify as per your requirement please)

format(msflexgrid1.textmatrix(r,c),"dd-mm-yyy")

where r,c are row and columns which can be obtained.
There are several date formats
"dd-mm-yy" may generate 23-9-99
"dd-mmmm-yy" may generate 23-September-99
"dd-mmm-yyyy" may generate 23-sep-1999




Santulan