Date incompatibility with Merant and progress

sfrischk

New Member
I have a date stored in a Progress database which I am trying to retrieve with a SQL query in VB. The problem I have is that the progress database seems to store the date in mm/dd/yyyy format, however SQL expects dd/mm/yyyy. As a result, I get an error whenever the day is over 12. The error is generated by MERANT. Does anyone know if there is a way I can convert the date in SQL so it will retrieve it properly, or is there some way I can use a progress statement to retrieve the data.

Thanks for your help,
Shane Frischkorn
 
U

Unregistered

Guest
One thought - in your DLC directory where you installed Progress, there is a file called startup.pf

In it, there may/may not be a line which reads
-d mdy

Either CHANGE it to read
-d dmy

or add a new line.

This will affect all of your Progress sessions on that PC so beware! If you want to avoid that, copy the startup.pf somewhere else, modify it and add a PROSTARTUP environmental variable pointing to that new file.

Hope this helps

Richard Thorp
richardt@grampian-software.co.uk
 

cup99

New Member
I had the same problem a while back, however, I can't remember exactly how I solved the problem as I don't have the code at hand.

If my memory serves me right I used the {FN} syntax in the SQL statement. What this allows you to do is include functions in the SQL statement as follows:

SELECT progress.field FROM progress WHERE {FN YEAR(progress.field)} = 2002.

I think that is the correct syntax but don't quote me.

Once I find the code I used, I'll repost if you are still having problems.
 
Top