howcan insert record Mon to Sata and Sun wll nt insert recod
how can insert record Monday to Sataday and Sunday will not insert record in sql server
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dhanunjay JajimogglaPosted Oct 15, 2014, 4:20 AM
you many handle this scenario in following ways...
1) Client side
OR
2) .cs Page
if(DateTime.Now.DayOfWeek.ToString()=="Sunday"){
// return some alert message
}
else
{
//call Insert method
}
3)In Stored Procedure
begin
if(select datename(dw,getdate())=='Sunday')
return 'There is no chance to insert the values on Sunday'
else
//your insert command
OR
4) Use trigger also