How to set date format in DD/MM/YYYY for DTPICKER class ..
- Code: Select all Expand view
#include "FiveWin.ch"
#include "dtpicker.ch"
FUNCTION Main()
local oWnd, oSay
local dDate
set date british
set century on
dDate := Date()
DEFINE WINDOW oWnd TITLE "DTPicker from code ...."
@ 2, 2 DTPICKER dDate OF oWnd ON CHANGE If( oSay != nil, oSay:Refresh(),) // not work MM/DD/YYYY
@ 3, 30 SAY oSay PROMPT "Date: "+ Dtoc( dDate ) OF oWnd SIZE 200, 20 // work here DD/MM/YYYY
@ 6, 2 BUTTON "From resources ..." OF oWnd ACTION FromRes( oWnd ) SIZE 150, 30
ACTIVATE WINDOW oWnd
return nil
FUNCTION FromRes( oWnd )
local oDlg, oSay
local dDate := Date()
DEFINE DIALOG oDlg RESOURCE "DTPTEST"
REDEFINE DTPICKER dDate ID 101 OF oDlg ;
ON CHANGE oSay:Refresh()
REDEFINE SAY oSay PROMPT "Date: "+ Dtoc(dDate) ID 102 OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
procedure AppSys // Xbase++ requirement
return
Not work..
get DTPICKER always display MM/DD/YYYY
Thanks for help
Regards
Fafi