prabhu p

prabhu p

  • NA
  • 181
  • 114.5k

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

Mar 6 2016 8:11 AM
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)