FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem with Date
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
problem with Date
Posted: Wed Aug 10, 2011 07:00 PM

Hello.

I have a date retrived from an external file as 090811 (9th august 2011).

I need to convert to Date format.

I use ctod("090811") but I got a blank date.

What is wrong?.

Thank you.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: problem with Date
Posted: Wed Aug 10, 2011 08:10 PM
Hello

is a not valid string date format

try with

Code (fw): Select all Collapse
   c := "090811"
   CToD( SubStr( c,1,2 ) + "/" + SubStr( c, 3,2 ) + "/" + SubStr( c, 5,2 ) )
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: problem with Date
Posted: Thu Aug 11, 2011 10:21 AM

Thank you.

I thought it was a newer Harbour function to handle this.

FWH 11.11, Harbour 3.1 and Borland C++ 5.82

Continue the discussion