 |
|
 |
|
Next: Error msg: The Command 'SaveRecord' isn't availab..
|
| Author |
Message |
External

Since: Nov 26, 2008 Posts: 5
|
(Msg. 1) Posted: Thu Dec 18, 2008 4:48 pm
Post subject: String to Date Conversion Error Archived from groups: comp>databases>paradox (more info?)
|
|
|
I have a script that has been working for years. It is on a machine that
needed some rehaul due to a virus (I did not do the rehaul). Everything is
clean and otherwise working as before for a few weeks now.
In the script, I build a string based on criteria that is later converted to
a date. In this case the string is "07/01/2008" and I am getting the
following errors on the stack in Paradox X3.
(1) Date:Proc:Date: The value of the parameter, 'value', is not legal.
Cannot convert parameter to a date.
(2) Could not convert data of type 'String' to type Date'. The types are
mismatched or the values are incompatible.
(3) Invalid character: 07/01/20"0"8
So, it obviously does not like the third digit in a four digit year, but I
have never had this problem before with four digit years. I have already
verified that the BDE is set to FOURDIGITYEAR (TRUE). Must be some other
mysterious setting.
Has anyone seen this before?
Many thanks, --Joe
P. S. I guess there is a bit of Paradox trivia in message #2. I did type it
correctly and the first single quote before Date is missing. Guess that
coding/formatting issue was never picked up. >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Oct 14, 2008 Posts: 10
|
(Msg. 2) Posted: Thu Dec 18, 2008 4:48 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Joseph Misko wrote:
> In the script, I build a string based on criteria that is later
> converted to a date. In this case the string is "07/01/2008" and I am
> getting the following errors on the stack in Paradox X3.
>
> (1) Date:Proc:Date: The value of the parameter, 'value', is not legal.
> Cannot convert parameter to a date.
>
> (2) Could not convert data of type 'String' to type Date'. The types are
> mismatched or the values are incompatible.
>
> (3) Invalid character: 07/01/20"0"8
Show the code!
What code is resulting in the error(s)?
What is the code converting the value to a date, or trying to?
What happens if you do
msginfo("",date("07/01/2008"))
on that specific, same system?
--
---------------
Tony McGuire >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Nov 26, 2008 Posts: 5
|
(Msg. 3) Posted: Thu Dec 18, 2008 5:18 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Tony McGuire" wrote in message
>
> Show the code!
>
> What code is resulting in the error(s)?
> What is the code converting the value to a date, or trying to?
>
> What happens if you do
>
> msginfo("",date("07/01/2008"))
>
> on that specific, same system?
>
> --
> ---------------
> Tony McGuire
Fair questions. I am a minimalist, so the code is trivial. Either of the
following lines produce that identical error.
view(date("07/01/2008"))
msgInfo("", date("07/01/2008"))
I could reproduce the entire script here, but that is not the issue. String
to date conversion within Paradox only is not working on this one computer.
It is working fine on all other computers that we access. >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Oct 14, 2008 Posts: 10
|
(Msg. 4) Posted: Thu Dec 18, 2008 5:18 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Nov 26, 2008 Posts: 5
|
(Msg. 5) Posted: Thu Dec 18, 2008 5:24 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Alright, problem solved! I wonder if the tech who restored the computer
changed the Windows date settings? Anyway, the short date format was set to
yyyy-MM-dd, and of course Paradox is expecting something like M/d/yyyy,
which I reset it to and everything is fine again. Thanks, --Joe >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Nov 26, 2008 Posts: 5
|
(Msg. 6) Posted: Thu Dec 18, 2008 8:05 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
That's it. Fixed in OS.
The date you gave was reflected as 2007-01-08. Then I found that the Windows
Short Date format got changed in some mysterious fashion.
"Tony McGuire" wrote in message
>
> How about
>
> msginfo("",date("07/01/08"))
>
> since you talked about 4 digit year.
>
> I'm thinking date format in OS and BDE are conflicting.
>
>
> --
> ---------------
> Tony McGuire >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Jun 07, 2008 Posts: 15
|
(Msg. 7) Posted: Fri Dec 19, 2008 9:52 am
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Thu, 18 Dec 2008 17:24:32 -0500, Joseph Misko wrote:
> I wonder if the tech who restored the computer
> changed the Windows date settings? Anyway, the short date format was set to
> yyyy-MM-dd
I recently read a good, techy reason to reset the system date format to
yyyy-mm-dd. Something to do with the fact that it sorts correctly when you
automatically stringify it.
Then again, the techie could have been one of those dreadful people who
insist that you do everything the "correct" way, which happens, in all
cases, to be *his* way. The sort of jerk who insists on giving temperatures
in centigrade -- and gets offended if you don't call it "Celsius".
This format messes up Quicken as well. I believe Paradox has a setting that
allows you to change its default format.
--
Jim Hargan >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Feb 09, 2005 Posts: 10
|
(Msg. 8) Posted: Fri Dec 19, 2008 2:58 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Jim Hargan wrote:
<snip>
> This format messes up Quicken as well. I believe Paradox has a setting that
> allows you to change its default format.
>
If possible, always force the format of dates using the format command.
You cannot count on the date settings so you might as well assume they
are. Also see the formatSetDateDefault, formatSetDateTimeDefault --
although now that I read the help is says "sets the default *display*
format". They might not effect casting. I honestly don't know.
--
Mark B >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
External

Since: Dec 01, 2004 Posts: 3
|
(Msg. 9) Posted: Sun Dec 21, 2008 6:15 pm
Post subject: Re: String to Date Conversion Error [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I would suggest using an alternative conversion technique that removes any
dependencies...
var
stMonth String
stDay String
stYear String
endVar
stMonth = "7"
stDay = "1"
stYear= "2008"
msgInfo("Alternative Date Conversion",date(stMonth,stDay,stYear))
If you are already building the date, the month,day, and year values are
already known.
Rick Kelly >> Stay informed about: String to Date Conversion Error |
|
| Back to top |
|
 |  |
| Related Topics: | Date and Time - I have a large amount of data to input and would like to input date and time without having to input the "/" between month, date and year and also without having to input for time the ":" Example: to input 12/15/07 I would like to o...
Informational : Format Date Specs - Some things in pdox get done so often it becomes second nature. Other times, one sits and thinks, how the heck did I do that last time ? Then, you must search for an example, or just figure it out again. I am not sure how many times I have had to go int...
Unknown error 81e4 - anybody know it? errror occurs sometimes not reproduceable by closing runtime 9 (with exit from form) Günter
PDOX7 Error: Too many printers installed? - We've moved a legacy Paradox 7 application on to a Windows/Citrix network with a LOT of printers: over 80. When we go to Printer Setup we get this error: "Too many printers installed." "Printer list trimmed." And that's about it for...
Unknown internal operating system error - Thought I'd share a very frustrating problem we've had for the last year or so, that was finally solved. We use the Corel Web Server to host a web service. Occassionally, it will stop working with this error: Unknown internal operating system error... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|