FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Set Date British
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Set Date British
Posted: Sat Dec 09, 2017 01:53 AM

Hi

oSheet:Cells( nRow, 5 ):Value=dtoc(date)

How to Set Date British.

Thanks

Regards

ACWoo
Using HWH1510
bcc582

Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Set Date British
Posted: Sat Dec 09, 2017 08:07 AM

Cells(1, 1):Value = doc(date())
Cells(1, 1):NumberFormat = "dd/mm/yyyy"

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: Set Date British
Posted: Sat Dec 09, 2017 08:48 AM

Thanks Mr Massimo

The output:

04/01/2017
04/02/2017
04/03/2017
04/04/2017
04/05/2017
04/06/2017
04/07/2017
04/08/2017
04/09/2017
04/10/2017
04/11/2017
04/12/2017
13/04/2017
14/04/2017
15/04/2017
16/04/2017
17/04/2017
18/04/2017
19/04/2017
20/04/2017
21/04/2017
22/04/2017
23/04/2017
24/04/2017
25/04/2017
26/04/2017
27/04/2017
28/04/2017
29/04/2017
30/04/2017

The cells are formatted as: Custom; "dd/mm/yyyy"
The dates are not all in April. It is supposed to be all in April.
It is not formatted as date but formatted as custom in Excel.

Regards

ACWoo

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Set Date British
Posted: Sat Dec 09, 2017 08:52 AM

Should be
oSheet:Cells( nRow, 5 ):Value= dDateValue // do not use DTOC

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion