Sri Lanka .NET Forum
a mission and a vision with .NET

Time is incorrect in date filed

Get Microsoft Silverlight

rated by 0 users
This post has 6 Replies | 3 Followers

Top 50 Contributor
Fast Poster
Points 5,769
gslakmal Posted: 11-30-2009 3:23 PM

hi,

When i enter data to date filed time is incorrcet. time is cooming like this for all the entries 11/29/2009 12:00:00 AM.

How can i save date filed with current time?

 

lakmal

MCTS Senior Software Engineer ASP.Net C#

 

 

  • | Post Points: 70
Top 200 Contributor
Cool Newbie
Points 1,246

send ur code ...

Dinesh  Kumara (Bsc,BIT,MCP)

http://dineshkumara.blogspot.com

 

  • | Post Points: 10
Top 25 Contributor
Forum Regular
Points 8,343

I think you are storing the date time value in DB. So you have to pass the date time object with the time value. Do not convert to short date time string.

If you not give the time portion, the DB keep that portion as 12:00:00 AM

{ SAP }
BCIS, MCPD (ASP.net), MCTS (ADO.net, ASP.net), MCP
http://sandunangelo.blogspot.com/

  • Filed under:
  • | Post Points: 10
Top 25 Contributor
Forum Regular
Points 6,120

hi,

Please check your format. It should set to long. or else use custom format which allows you to display time as well (dd/mm/yyyy MM:hh)

Melick UCSC

BICT,MCP,MCTS,BIT

http://melick-rajee.blogspot.com

  • | Post Points: 30
Top 50 Contributor
Fast Poster
Points 5,769

Hi,

This give date and time together

 

System.dataetime.now.tostring()

MCTS Senior Software Engineer ASP.Net C#

 

 

  • | Post Points: 30
Top 25 Contributor
Forum Regular
Points 8,343

So what is the problem then??

{ SAP }
BCIS, MCPD (ASP.net), MCTS (ADO.net, ASP.net), MCP
http://sandunangelo.blogspot.com/

  • | Post Points: 30
Top 50 Contributor
Fast Poster
Points 5,769

Problem has solve,Meaning of above post is  i share solution with other members

MCTS Senior Software Engineer ASP.Net C#

 

 

  • | Post Points: 10
Page 1 of 1 (7 items) | RSS
This space is available for you to advertise. Please contact admin@dotnetforum.lk for more details on how to advertise on the .NET Forum.
Copyright © Sri Lanka .NET Forum. All Rights Reserved. Terms of Use | Privacy Policy