C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




asp.net,c#


Posted Date: 05 Sep 2008      Total Responses: 3

Posted By: g.krishna        Member Level: Silver     Points: 1


Hi,


In sqlserverdatabase i took filedname date in that iam using varchar datatype,i want tody's date to inserted in database,in my application iam i want store date in label,pls give me code in c#



Thanks & Regards




Responses

Author: vipul    05 Sep 2008Member Level: DiamondRating:     Points: 3
Hi,
for that you take today date in this way
System.DateTime.Now.ToShortDateString() it return date string so directly store that in to the database no need to convert into the string .


vipul,
http://dongavipul.blogspot.com



Author: Subodh kumar Prajapati    05 Sep 2008Member Level: GoldRating:     Points: 3
hi,
you can use this.
Suppose you are useing datareader then :

label1.Text=datareader1["date"].toString();



Author: Athira Appukuttan    05 Sep 2008Member Level: DiamondRating:     Points: 3
Labe1.text=datetime.now.tostring("dd/MM/yyyy");

string Date= label.text;

store date in DB use date variable



Post Reply
You must Sign In to post a response.
Next : Create a ToolBar
Previous : Image Map - Very Urgent
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use