| Author |
Message |
Mr Frustrated
Guest
|
Posted:
Fri Nov 11, 2005 1:51 pm Post subject:
Formatting DATE fields within lists |
|
|
This should be simple......but here goes.
I have a list with a date field imaginatively called DATE. I want to display
the list grouped by year. I have tried to use a calculated field and the
formula "=YEAR([DATE]), then group on the calculated field. This sort of
works in that it does what I want, however the formatting of the year is in
standard numeric format and displays 2005 as 2,005.
I've tried everything I can think of in terms of FORMAT(YEAR........),
DATEFORMAT(............), CONVERT(.........), etc, and none seems to work. If
anybody has any ideas, I'd be very happy as my laptop is about to go sailing
out of the fifth floor window!
Cheers. |
|
| Back to top |
|
 |
Engelbert
Guest
|
Posted:
Fri Nov 11, 2005 1:51 pm Post subject:
Re: Formatting DATE fields within lists |
|
|
Faced with the same problem, I just created a new field "imaginatively"
called Year and made it compulsary (and default this year written as 2005)
so that every time anything was added it got the default. For old records I
added the content in bulk using Datasheet View.
(Just had to remember to change the default once a year ...)
Engelbert
"Mr Frustrated" <Mr Frustrated@discussions.microsoft.com> wrote in message
news:C840052B-451A-4848-B23A-0BCB9C56D667@microsoft.com...
| Quote: | This should be simple......but here goes.
I have a list with a date field imaginatively called DATE. I want to
display
the list grouped by year. I have tried to use a calculated field and the
formula "=YEAR([DATE]), then group on the calculated field. This sort of
works in that it does what I want, however the formatting of the year is
in
standard numeric format and displays 2005 as 2,005.
I've tried everything I can think of in terms of FORMAT(YEAR........),
DATEFORMAT(............), CONVERT(.........), etc, and none seems to work.
If
anybody has any ideas, I'd be very happy as my laptop is about to go
sailing
out of the fifth floor window!
Cheers. |
|
|
| Back to top |
|
 |
Mr Frustrated
Guest
|
Posted:
Fri Nov 11, 2005 1:51 pm Post subject:
Re: Formatting DATE fields within lists |
|
|
Thanks for that Englebert.
I thought about doing it that way myself, but unfortuantely the dates that
are going to be entered are not necessarily the current year. They could be
last year, this year, next year, etc; therefore a more dynamic solution would
be preferrable.
"Engelbert" wrote:
| Quote: | Faced with the same problem, I just created a new field "imaginatively"
called Year and made it compulsary (and default this year written as 2005)
so that every time anything was added it got the default. For old records I
added the content in bulk using Datasheet View.
(Just had to remember to change the default once a year ...)
Engelbert
"Mr Frustrated" <Mr Frustrated@discussions.microsoft.com> wrote in message
news:C840052B-451A-4848-B23A-0BCB9C56D667@microsoft.com...
This should be simple......but here goes.
I have a list with a date field imaginatively called DATE. I want to
display
the list grouped by year. I have tried to use a calculated field and the
formula "=YEAR([DATE]), then group on the calculated field. This sort of
works in that it does what I want, however the formatting of the year is
in
standard numeric format and displays 2005 as 2,005.
I've tried everything I can think of in terms of FORMAT(YEAR........),
DATEFORMAT(............), CONVERT(.........), etc, and none seems to work.
If
anybody has any ideas, I'd be very happy as my laptop is about to go
sailing
out of the fifth floor window!
Cheers.
|
|
|
| Back to top |
|
 |
Engelbert
Guest
|
Posted:
Fri Nov 11, 2005 1:51 pm Post subject:
Re: Formatting DATE fields within lists |
|
|
The minor amendment is to have the field a Choice field so they at least
have the drop-down of years to select from.
Yes, I know there must be a better way ...
Let's wait for someone to come in the thread with it.
Engelbert
"Mr Frustrated" <MrFrustrated@discussions.microsoft.com> wrote in message
news:23752A0E-25DA-40B2-ADF8-D53A1B4B0ECD@microsoft.com...
| Quote: | Thanks for that Englebert.
I thought about doing it that way myself, but unfortuantely the dates that
are going to be entered are not necessarily the current year. They could
be
last year, this year, next year, etc; therefore a more dynamic solution
would
be preferrable.
"Engelbert" wrote:
Faced with the same problem, I just created a new field "imaginatively"
called Year and made it compulsary (and default this year written as
2005)
so that every time anything was added it got the default. For old records
I
added the content in bulk using Datasheet View.
(Just had to remember to change the default once a year ...)
Engelbert
"Mr Frustrated" <Mr Frustrated@discussions.microsoft.com> wrote in
message
news:C840052B-451A-4848-B23A-0BCB9C56D667@microsoft.com...
This should be simple......but here goes.
I have a list with a date field imaginatively called DATE. I want to
display
the list grouped by year. I have tried to use a calculated field and
the
formula "=YEAR([DATE]), then group on the calculated field. This sort
of
works in that it does what I want, however the formatting of the year
is
in
standard numeric format and displays 2005 as 2,005.
I've tried everything I can think of in terms of FORMAT(YEAR........),
DATEFORMAT(............), CONVERT(.........), etc, and none seems to
work.
If
anybody has any ideas, I'd be very happy as my laptop is about to go
sailing
out of the fifth floor window!
Cheers.
|
|
|
| Back to top |
|
 |
|
|
|
|