Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 7 of 7 total |
about the formula of calculation field. |
Wed, Feb 10 2016 6:04 AM | Permanent Link |
宮腰 具明 SISAN SYSTEM RESEARCH. Co. Ltd. | Please tell me about the formula of calculation field.
Field definition Building_Date: TDATE years : Integer "years" is Formula field Calculation formula is (Current_Date - BuildDate) / 365) This will work well. I want to make changes in the following manner IF (BuildDate > CAST('1899-12-31' AS DATE) , (Current_Date - Building_Date) / 365) ,0) It does not work. (Current_Date - Building_Date) / 365) will have returns 0. ????. What is wrong? and I want, in the following manner, if possible "IF (BuildDate > CAST('1899-12-31' AS DATE) , (Current_Date - Building_Date) / 365.25) ,0)" Thank you Tomoaki Miyakoshi |
Wed, Feb 10 2016 6:07 AM | Permanent Link |
宮腰 具明 SISAN SYSTEM RESEARCH. Co. Ltd. | I made a mistake...
"BuildDate" is "Building_Date" Thank you |
Wed, Feb 10 2016 6:12 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Tomoaki,
<< Please tell me about the formula of calculation field. >> Just to clarify: are you trying to define an ElevateDB COMPUTED or GENERATED column in a table, or a calculated TField in your Delphi/C++ application ? Tim Young Elevate Software www.elevatesoft.com |
Wed, Feb 10 2016 7:15 AM | Permanent Link |
宮腰 具明 SISAN SYSTEM RESEARCH. Co. Ltd. | Tim,
Thanks for the reply. I'm using the DelphiXE and ElevateDB 2.21. I am trying to modify the table definition of elevateDB. The value of the field "Build_Year" of Table is, to calculate the EDB. And, I want to use in my application "Build_Date" DATE DESCRIPTION 'Jap 建築年', "Build_Year" INTEGER COMPUTED ALWAYS AS (Current_Date - Build_Date) / 365 DESCRIPTION 'Jap 築年数', I want to re-defined using the EDBmgr . What does this message has become the answer to your question? (I am making a sentence in the Google translation feature.) Thank You. Tomoaki Miyakoshi |
Thu, Feb 11 2016 6:38 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Tomoaki,
<< The value of the field "Build_Year" of Table is, to calculate the EDB. And, I want to use in my application "Build_Date" DATE DESCRIPTION 'Jap 建築年', "Build_Year" INTEGER COMPUTED ALWAYS AS (Current_Date - Build_Date) / 365 DESCRIPTION 'Jap 築年数', I want to re-defined using the EDBmgr . >> Okay, this is the expression that you want for a COMPUTED column definition: (CURRENT_DATE() - Build_Date) YEAR That will return the number of years between the current date and the value in the Build_Date column. Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 11 2016 9:29 PM | Permanent Link |
宮腰 具明 SISAN SYSTEM RESEARCH. Co. Ltd. | Tim,
<<(CURRENT_DATE() - Build_Date) YEAR >> I was successful confirmed the operation! Thank you very much!! I have found it possible to communicate in English to create. I also will question the future Thank you. Tomoaki Miyakoshi |
Fri, Feb 12 2016 6:14 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Tomoaki,
<< I have found it possible to communicate in English to create. I also will question the future >> Excellent, please feel free to do so. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |