DateTime format problem

Can anyone help with this datetime problem.
In my BLL i have: this.travelNewsDateInserted = Convert.ToDateTime(travelNewsDateInserted.ToString("ddd dd MMM yyyy HH:mm:ss")); which should return something like: Sun 16 Nov 2008 19:15:36

But what i'm getting is: 16/11/2008 19:15:00

In my aspx.cs file i have:
  List<RetrieveTravelNewsObj> returnTravelNews = getTravelNews.GetTravelNews(strDisplayMode, strDisplayFullNewsDetails);
            if (returnTravelNews.Count > 0)
                foreach (RetrieveTravelNewsObj DisplayTravelNews in returnTravelNews)
                    TravelNewsDateInserted.Append(DisplayTravelNews.TravelNewsDateInserted.ToString("ddd dd MMM yyyy HH:mm:ss"));

I have even added ("ddd dd MMM yyyy HH:mm:ss")); to the aspx.cs file but i just cannot change the date format.

Any help would be appreciated
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

this.travelNewsDateInserted = Convert.ToDateTime(travelNewsDateInserted.ToString("ddd dd MMM yyyy HH:mm:ss"));

here you are trying to store formatted datetime string to DATETIME Datatype( i.e this.travelNewsDateInserted). datetime data type never store date somthing like "Sun 16 Nov 2008 19:15:36" , if you want to keep same format use STRING Datatype insteed of DATETIME Datatype
BeginningWebDesignAuthor Commented:
Hi Binuth:
I'm not sure what you mean, can you give me a example

//DateTime Datatype : internaly it stores only digit like year month day
			DateTime travelNewsDateInserted = new DateTime(2008,10,10);
			// here you trying to store same DATETIME, i.e when you use Convert.ToDateTime - function it returns
			// DATETIME object not formated string object
			travelNewsDateInserted = Convert.ToDateTime(travelNewsDateInserted.ToString("ddd dd MMM yyyy HH:mm:ss"));
			String strTravelNewsDateInserted; 
			//Here STRING Datatype : you can store formated string
			strTravelNewsDateInserted =  travelNewsDateInserted.ToString("ddd dd MMM yyyy HH:mm:ss");

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BeginningWebDesignAuthor Commented:
Hi Binuth:
Understand now, works OK thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.