Link to home
Start Free TrialLog in
Avatar of mikef17
mikef17

asked on

MSHFlexGrid problem

Hi everybody;
I'm trying to use MSHFlexGrid control
1.I set English date format "dd/mm/yy" in regional  
  settings
2.In the recordset i see date in "dd/mm/yy" format

but I see all the dates in American format "mm/dd/yy" on MSHFlexGrid control. What's the problem? What can I do?


Thanks in advance
Avatar of Kbegger
Kbegger

You can use th format () function to set these date
 syntax format(date,"dd/mmm/yy") -> it will return
 08/Aug/02
 here I am useing the system date , if you want to convert
the format of a cell in MSHflexGrid , use the cell row and
column number thire.

by
Kbegger
hai mikef17,
   u have set the reginal settings to English(what?). is it UnitedStates, UnitedKingdom.. check this out and set it accordingly and check the date format. hope this works...
anu
Avatar of mikef17

ASKER


Hi

anu1401
I have "dd/mm/yy" date format(UnitedKingdom) at my computer

Kbegger
How can i use format () function with MSHFlexGrid control?
MSHFlexGrid control has a recordset as datasource.In  recordset i see date 25/02/2002, but in MSHFlexGrid 02/25/2002
ASKER CERTIFIED SOLUTION
Avatar of anu1401
anu1401

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikef17

ASKER

Thanks anu1401
This works out!

Dim str As String
Dim i, j As Long
  For i = 0 To MSHFlexGrid1.Rows - 1
    For j = 0 To MSHFlexGrid1.Cols - 1
      If Not IsNull(MSHFlexGrid1.TextMatrix(i, j)) Then
        If IsDate(MSHFlexGrid1.TextMatrix(i, j)) Then
          MSHFlexGrid1.TextMatrix(i, j) = Format(MSHFlexGrid1.TextMatrix(i, j), "dd/mm/yyyy")
        End If
      End If
    Next j
  Next i
great!!
then am I not correct......???  mekef17.....?