Hi,
Thanks
         
        
           
         
            
       
      
        
          
          
            micu  
          
              
                January 27, 2023, 12:37pm
               
              #2 
           
         
        
          Hi,
  
  
    In my application I calculate the duration as follows: 
doo.model.duration.value = (doo.model.end.value - doo.model.start.value)/3600000; 
When I switch to the New TypeScript editor, the entire expression is underlined with a red wavy line. And the message "The left-hand side of an arithmetic operation must be of type ‘any’. ‘number’. … 
The calculation in the form works correctly, but NaN is printed on the console. 
If I create Duration as calculated field: end - start, the result is always 000…
   
 
Just keep on mind that we store the date as ISO string, so you need to convert it first.
new Date(new Date(myDate).setDate(new Date(myDate).getDate() + 3))
Regards