Hi everyone,
The problem I am facing is with the following instruction(my page compiles but does not run):
MyDate := CALCDATE( "remainingTime", "Start Date");
When I look in the Source Table of the form, "remainingTime" is of type Integer...
What shall I do???
Answers
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
The problem is that I am reviewing an old code...and I don't have the permission to change anything in the datatypes of the table fields...I was wondering if I can convert the integer value to a date...
In fact, I am reviewing an old code in order to transform the forms into pages...
This is one of the issues I encountered...
well, if you know calcdate, you also know that it's not the function to convert integer to data
what kind of integers do you want to convert?
what date is 234567890, for example?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I was looking for a way to convert the integer value to a date before passing it to the CALCDATE function...The integer value expresses the number of the remaining days before starting a payment...
I tried the FORMAT() function, and the errors disappeared, but I am not really sure about the results...I have to check with my manager...
if you have '12' in your field, what date should it become? today+12? some date field +12?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
If I have '12' in my field, it should be added to another date field (a date in which the employee got the loan)
By the way...it's an old customization with old data, so you can:
- create another field of type dateformula to store the information
- convert your integer field to date formula as follows and put the result in the new field
- clear the data the old field
- copy in a notepad the old field number
- delete the old field
- rename the new field with the number of the old one
or you can use the "dirty way":
In order to make that field a valid parameter you should format it like this. which results in <12D> (brackets to make the formula "language independent")
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
PS: test the modification on a test database, obviously...especially if you move the data (i recommend that solution, instead of the "dirty way")
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Then try