1
Answer

How to push date in datatype date in sql databasein asp.net

prabhu p

prabhu p

8y
467
1
Dal
 
 
iam writing
 
BO object
string strdatefrom  
Datatype of that  date column in table is date and in  Stored procedure  also date  
 
parameter.value[0]  = Convert.ToDatetime (objbo.strdatefrom) ,
Its working fine because our Date format indb 2015-02-01(yyyy-mm-dd) from string it defaultly taking year,month,date
Our senior told its wrong way of  passing date in string if  date formate changed in  DATABASE future  IT WOULD RAISE EXCEPTION ERROR LIKE THAT .
 
FOR THAT HOW SHOULD I  want to write code  
 

Answers (1)