Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET DATE FORMAT ERROR

Status
Not open for further replies.

bbacksoon

Programmer
Aug 30, 2002
5
US
I am very new to Clipper so this may be a stupid question but I am trying to compile from the dos prompt. I get what looks like a good compile but when I try to run I get an error that reads. "Error BASE/1126 Argument error: SET".

The books tell me that it is my Set Date Format Statement.
I am trying to get the date into a 'YYYYMMDD' format. This program is being used by a different division of my company and they do not have any problem compiling it. Any thoughts. Do I need an updated library file or something? The book says something about the CLIPPER.LIB file.

Any help would be most appreciated. I need to make many changes to this program and I am not affraid of that except I am having trouble compiling. I can send it to another programmer but that just isn't right.
 
Hi, BB

This little program:

set date format to "yyyymmdd"
?date()

returns 20021007

Is that what you are doing? If so I dunno, works ok on plain vanilla clipper 5.2.

Jock
 
I am in the PROCEDURE MAIN section. There are several SET commands including SET CENTURY ON, SET EPOCH TO 1980 and SET DATE FORMAT "YYYYMMDD".

The Error Message book says
BASE/1126
Explination: The date format was not legal.
Action: Correct the program.

If I set the format to "YYYY/MM/DD" it works fine. If I use just "YYMMDD" I get the same error when I try to run.

If I am not explaining this correctly I appologize.
 
Hi, BB.

Sorry, I don't see why it doesn't work for you.
Maybe someone else has an idea.
What version of clipper are you running?? Under which OS?

Jock
 
I am running Clipper 5.3 on a Windows 95 laptop. The version I have was a new never used version. We licensed it just a few weeks ago when it was loaded. The book that I have that came with it is dated June of 95.

I always have problems like this, never anything easy.

Can you imagine why I am leery of new/old software?

If I take the line out it will compile and run but I don't get the date formatted the way I need it for the next piece of the process.

I am extracting from Fourth Shift into a DB4 database, Into the Clipper Program then supposedly into a VB job. Like I said one of our sister divisions built this procedure so instead of trying to reinvent the wheel... You get the idea.
 
If the field is a date field in the database, then it is stored as yyyymmdd anyway, the SET DATE only changes the way it is displayed on screen or printer.

If you are just extracting data to a dbf file the date field will be correct. If you are exporting to a text file then try using dtos(datefield) which returns yyyymmdd.

Although not specified, I suspect that the format must use pad characters between the numbers.

This has not been tried on 5.3, but I would expect it to work. My copy of 5.2e does not like SET DATE FORMAT TO "yyyymmdd"

Hope that helps.
 
I resolved this problem by getting a newer version of the Clipper.lib file. The one I had was dated in 95 and the one that I got from our sister division was from 97.

All is well.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top