Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Need Remaining day in SQL Query

Hi experts

i had created a UDT in which i had a field name, Expiry date, now in SQL query i need to get an additional Field called 'No of Days Remaining',

and this field data is calculating is as follows

Expiry date Field - Current System Date =  'No of Days Remaining',

01/06/2015   -   15/06/2015                     =     15 Days

pls help me to solve this


Former Member

Hi Shahan,

Please use below query

SELECT DATEDIFF(day,GetDate(), $[UDT.UDF]) [Remaning] FROM UDT T0



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question