Date , day , month year in Sql-server and asp.net c#
sql-server
select DATEPART(yyyy, getdate())
select DATEPART(dd, getdate())
select DATEPART(mm, getdate())
select convert(varchar,getdate(),101)
asp.net c#
int streventday = DateTime.Now.Day;
int streventmnt = DateTime.Now.Month;
int streventyear = DateTime.Now.Year;
string strdate DateTime.Now.ToString("MM/dd/yyyy");
No comments:
Post a Comment