Hi all!
I have a problem with data type conversion.
I have a BigInteger field that is the number of days of a lead time.
I have to insert it in another field, which is a dateformula field.
I tried something like:
EVALUATE(dateFormulaField, FORMAT(bigIntField) + 'D');
but it does not work.
Can someone help me?
Thank you!
Comments
Message is '1D' :-k
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
it gives the correct message, but when you execute record.INSERT;
it says:
... Syntax error converting the varchar value '90☺' to a column of data type int.
Any ideas?
PS.: it doesn't word with integer fields (not only bigint ) as well.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
If you look at the data in sql server, you will notice that the dateformula are not stored directly as they are.
If you write 1D + 1Y, it doesn'y actually store that value, but it stores something like 1☺+1☺. The letters are stored in ascii codes like:
ascii(1) for C, ascii(2) for D, 3 for WD, 4 for W, 5 for M, 6 for Q, 7 for Y.
If you write the ascii code 1, 2 ,... you will see only strange characters like ☺.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you all! :whistle:
How can I assign a field DateFormula to an integer field
Anyone can help please?????
Hanen TALBI
And it is better to create new topic than answering in some which is 5 years old... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.