Re: ASP.Net [2.0] - Converting a date to a new format...
- From: Jan Hyde <StellaDrinker@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 May 2006 16:19:55 +0100
"Rob Meade" <ku.shn.tsews.thbu@xxxxxxxxx>'s wild thoughts
were released on Mon, 22 May 2006 15:28:31 +0100 bearing the
following fruit:
"Jan Hyde" wrote ...
OK, can you show us how 'mydate' is declared because I don't see "index"
okey dokey - I'll post it up this evening, its on my laptop at home at the
moment....if its of any help - I can roughly remember (but will still post
this evening).,..
My "User" class has a class variable
Private _profileLastUpdated AS Date
I also have a property for that..
Public Property ProfileLastUpdated As Date
Get
...
Set
..
End Property
I populate this via my data access layer....
Where I have a function that populates a datatable, a item is taken from the
row and pushed into the property of my User class...
Something like this:
User.ProfileLastUpdated = DataTable.Rows(0).Item("ProfileLastUpdated")
I think thats about it - as I said I'll post the code up propertly this
evening, but that all feels familiar to me....
On the web page I then have a label which I populate on my page load (or at
least a function called from the page load)....
lblProfileLastUpdated = "Last updated: " & User.ProfileLastUpdated
that would give me...
Last Updated: 22/05/2006 15:27:00
I basically want to lose the seconds from that - and a character mangling
solution wasn't really what I wanted (ie, using LEFT / RIGHT / LEN) -as I'd
used the format part of .ToString before I assumed it would work fine here
too...
Regards
Rob
I tried to mimic your setup but I still get the option to
provide a format string. I just know this is gonna be
something so simple we'll both kick ourselves.
Jan Hyde (VB MVP)
--
Metallurgist: Someone who is allergic to iron. (Leo Roston)
.
- Follow-Ups:
- Re: 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...
- 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
- Re: 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
- Re: ASP.Net [2.0] - Converting a date to a new format...
- From: Rob Meade
- ASP.Net [2.0] - Converting a date to a new format...
- Prev by Date: GridView Directly Accessing the Edit of FormView
- Next by Date: Re: Where to put server side c# code (in .aspx or in the aspx.cs ?)
- 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
|