Dear all
I have two dates in textboxes in the format of dd-MM-YYYY
1 button (calc overall Tx time)
When the button is clicked i wanted to calculate the difference (in days) between the two dates in textboxes and display it. I have tried hard but ended in vain. Your help is highly appreciated. Thanks in advance.
Thanks for the reply. I am a novice programmer. I have tried something on your suggestion but i dont know where i am going wrong. Please help me in this regard
MakeInstant( from ) Returns an instant in time specified by MM/dd/YYYY hh:mm:ss or MM/dd/YYYY or hh:mm.
The example uses MM/dd/YYYY. You are providing the date as MM-dd-yyyy . Unfortunately that format will not work with the MakeInstant Block.
You enter the date as 05-22-2020 . In your TextBox, either enter the date as 05/22/2020 or write a procedure to replace the ’ - ’ in the dates you enter with a slash " / " when you format the date.
It appears you cannot take a typed date from textboxes in the algorithm. I made an assumption they would work (an adapted code I already had using DatePickers).