Obtaining windows region date format

Obtaining windows region date format

Postby hua » Thu Dec 07, 2017 3:08 am

Hi guys,
How to obtain a windows region date format?

TIA
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Obtaining windows region date format

Postby nageswaragunupudi » Thu Dec 07, 2017 4:16 am

Code: Select all  Expand view  RUN
  #ifndef HKEY_CURRENT_USER
      #define  HKEY_CURRENT_USER    0x80000001
   #endif

function test()

   local oReg

   oReg  := TReg32():New( HKEY_CURRENT_USER, "Control Panel\International", .f. )
   ? oReg:Get( "sShortDate" )
   ? oReg:Get( "sLongDate" )
   oReg:Close()

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Obtaining windows region date format

Postby hua » Thu Dec 07, 2017 4:19 am

Thanks Rao!
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Obtaining windows region date format

Postby nageswaragunupudi » Thu Dec 07, 2017 5:29 am

If you want to display date values in these formats, you can use

? cValToStr( dDateValue, cFormat )

For displaying the date values in Xbrowse using these formats, you can set oCol:cEditPicture := cFormat
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10681
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Obtaining windows region date format

Postby hua » Thu Dec 07, 2017 6:47 am

Thanks for the tip Rao!
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 17 guests