J'affiche mes données avec un msflexgrid le probleme est comme ca:
Je veux afficher ma date sous la forme dd/mm/yyyy ais avec msflexgrid il 'affiche la date sous la forme:m/dd/yyyy.
Merci
J'affiche mes données avec un msflexgrid le probleme est comme ca:
Je veux afficher ma date sous la forme dd/mm/yyyy ais avec msflexgrid il 'affiche la date sous la forme:m/dd/yyyy.
Merci
avec datagrid se probleme n'existe pas.
au fait y'a pas un "truc" meilleur que l'MS FlexGrid ??? et pk???
Il me parait qu'il y en a au moins un de "bon truc" : "poster" dans le bon sous-forum, après avoir lu les règles et le mode d'emploi.![]()
formatte ta date avant de l'inscrire dans la cellule que tu désires![]()
Hi![]()
j avais moi aussi l même probléme mais j l ai résolu avec cette fonction![]()
la fonction accepte 2 arguments , le flexgrid passé en référence,et l index du colonne de la date
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 'Formater La date d'un flexgrid Public Sub FormaterDate(ByRef grid As MSHFlexGrid, IndexChampdate As Integer) Dim vi As String For i = 1 To grid.Rows - 1 grid.TextMatrix(i, IndexChampdate) = _ Format(grid.TextMatrix(i, IndexChampdate), "dd/MM/yyyy") If Day(grid.TextMatrix(i, IndexChampdate)) <= 12 Then vi = Month(grid.TextMatrix(i, IndexChampdate)) & "/" & _ Day(grid.TextMatrix(i, IndexChampdate)) & "/" & _ Year(grid.TextMatrix(i, IndexChampdate)) Else vi = Day(grid.TextMatrix(i, IndexChampdate)) & "/" & _ Month(grid.TextMatrix(i, IndexChampdate)) & "/" & _ Year(grid.TextMatrix(i, IndexChampdate)) End If grid.TextMatrix(i, IndexChampdate) = vi Next i End Sub
Partager