Re: ASP.Net [2.0] - Converting a date to a new format...
- From: "Rob Meade" <ku.shn.tsews.thbu@xxxxxxxxx>
- Date: Mon, 22 May 2006 11:49:06 +0100
"Jan Hyde" wrote ...
I'm not clear what the problem is, you appear to be saying
you want date variables to act like formatted strings and
that ain't gonna happen.
Hi Jan, thank you for your reply.
Clearly I didn't explain myself very well...my apologies.
What does it matter how the data variable holds the date?
Aren't you displaying the date in the format you desire anyway?
I have the date stored in the database and my class as a date, it also has
the time etc...
What I want to be able to do on my web page is say this:
"Last updated: 22/05/2006 11:46"
what I dont want is this:
"Last updated: 05/22/2006 11:46:01 AM" or whatever else it feel like adding
etc :)
What I used to be able to do was this:
Response.Write (myDate.ToString("dd/MM/yyyy HH:mm")
and I get exactly that:
22/05/2006 11:46
I am unable to do this now in .net 2.0 - the ToString function does not give
you the format stuff in the brackets, instead I get an "index" instead?
whats a bit weird is that I can type..
..ToString.ToString("dd/MM/yyyy") - not that it worked, but I thought it odd
I could tostring a tostring??!
Is any of this any clearer?
Regards
Rob
PS: What do you use to configure that reply at the top?
ie,
.
- Follow-Ups:
- Re: ASP.Net [2.0] - Converting a date to a new format...
- From: Jan Hyde
- Re: ASP.Net [2.0] - Converting a date to a new format...
- References:
- ASP.Net [2.0] - Converting a date to a new format...
- From: Rob Meade
- Re: ASP.Net [2.0] - Converting a date to a new format...
- From: Jan Hyde
- ASP.Net [2.0] - Converting a date to a new format...
- Prev by Date: Re: How to deploy 2 distinct ASP.NET apps with one in V.Dir and one in site root
- Next by Date: Re: How to deploy 2 distinct ASP.NET apps with one in V.Dir and one in site root
- Previous by thread: Re: ASP.Net [2.0] - Converting a date to a new format...
- Next by thread: Re: ASP.Net [2.0] - Converting a date to a new format...
- Index(es):
Relevant Pages
|