Vote count:
0
I have a table with this data in sql server 2012.
tbl_contract
-------------
ContractId RenueDate BillDay BillMonth
------------------------------------------------------------------
1 2014-06-15 10 -1
2 2014-08-04 1 -2
now i need to format a biiling date and billing date should be according to billmonth and billday from renuedate, like,
ContractId RenueDate BillingDate
---------------------------------------------------
1 2014-06-15 2014-05-10
2 2014-08-04 2014-06-01
and i need to do it with sql query only. Means i need to get those contract whose billing date is less or equal to today's date. and i need to create billing date from renue date, billday and billmonth.
Can anyone help me to do this ? what should i do in query to format billing date and compare it to today's date like this ?
Please some help me.
Thanks in advance.
asked 16 secs ago
Aucun commentaire:
Enregistrer un commentaire