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

Time is incorrect in date filed

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

Top 50 Contributor
Posts 175
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#

 

Top 200 Contributor
Posts 40

send ur code ...

Dinesh  Kumara (Bsc,BIT,MCP)

http://dineshkumara.blogspot.com

 

Top 25 Contributor
Posts 327

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, MCTS (ADO.net), MCP
http://sandunangelo.blogspot.com/

Top 25 Contributor
Posts 326

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

Top 50 Contributor
Posts 175

Hi,

This give date and time together

 

System.dataetime.now.tostring()

MCTS Senior Software Engineer ASP.Net C#

 

Top 25 Contributor
Posts 327

So what is the problem then??

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

Top 50 Contributor
Posts 175

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

MCTS Senior Software Engineer ASP.Net C#

 

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