Year Format

Tansar

Registered User.
Local time
Today, 08:41
Joined
Dec 28, 2000
Messages
55
Hi,
i have got my year format set as yyyy, which displays the year only. But when I click on the field it shows the full date.:confused:

This causes me a problem when concatenating two fields together, as I get the full date also. How do I solve this? I only need the year to show.

Thank you :)
 
When concatenating:

Year(YourDateField) & Whatever
 
Erm...:confused:

My data type in my table is set as: Date/time. The format is set to yyyy. Yet I get a full date like 02/07/2008. I only need 2008 :o
 
What Paul suggested will work. The function Year() returns just the year portion of the date. Format simply changes how the date is displayed, not what the underlying date value is.

The concatenation uses the value of the date, not the way it is displayed. So using the function Year() returns a value equal to the year portion of the date, and this can then be concatenated with whatever you want.
 
Hmm...ok.

i have this:

EXPR1: [TM] & " " & [TRO_ID] & " " & [TRO_Year] & "/" & [TRO_Engineer]

Where would I add format to this?:(
 
You don't add format anywhere. I was simply explaining the difference between how the function Year() works versus formatting.

Assuming the field TRO_Year contains a datetime value:

Code:
EXPR1: [TM] & " " & [TRO_ID] & " " & Year([TRO_Year]) & "/" & [TRO_Engineer]
 

Users who are viewing this thread

Back
Top Bottom