CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Formatting dates in MSFlexGrid

    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.

  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Use Format()

    One of my old replies (check it):
    http://www.codeguru.net/bbs/wt/showp...age=0&Limit=25

    Michael Vlastos
    Automation Engineer
    Company Modus SA
    Development Department

  3. #3
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Formatting dates in MSFlexGrid

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured