FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Date Issue
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Date Issue
Posted: Thu May 08, 2014 11:49 PM

How do I put a date into a dbf if the date is in the format: 06-Apr-1960
I am reading info from a .txt file ... The Windows date format in both computers (the one that makes the .txt file and the system that reads the .txt file) would be set to the same format.

I also notice that when set to this format, my dates in my listbox are all messed up.
Ex: 08-Sep-69 (as seen in my datepicker field) shows as 08-009-969 (as seen in the listbox)

In Windows date settings, this format is listed as: Short Date: dd-MMM-yy

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: Date Issue
Posted: Fri May 09, 2014 01:19 AM

Ok, i sorted out the first issue.

I still have the problem of the date being messed up in the Listbox.

Any ideas?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Date Issue
Posted: Fri May 09, 2014 10:36 AM

Fivewin function uCharToVal( "06-Apr-1960", 'D' ) returns Date correctly. You may check and use this function to covert date strings into date variables.

As far as my limited knowledge goes we may not use 'MMM' in short date formats in windows.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion