December 15, 200421 yr I'm trying to create a field and have it display ONLY the year on a layout. I created a field ... TEST the type is Date. Clicked on Options and Calculated Value and in the calculation window entered Year(Get(Current Date)). I thought this would return only 2004 in the field test. What I get is 6/27/0006. I even tried changing the Get(Current Date) to a known date field and still get 6/27/0006. Has me baffled! Can someone tell me how I can get a field to display only 2004 when the record is created in 2004 and also.... what the heck is the 6/27/0006? I've already double checked that the date on my machine is correct.
December 15, 200421 yr What do you get if you have the result of Text? The field result has to be text. When you select date, FileMaker is trying to make 2004 into XX/XX/XXXX. HTH Lee
December 15, 200421 yr Author Well, that does work... imagine that huh? Thank You! Didn't seem logical to me to make it a text field when I was dealing with a date. I'll learn this eventually I hope... keep plugging away at least. I do appreciate your direction!!!
December 15, 200421 yr A date field will only return a result in a date format. Dates are merely numbers, the number of days since 1/1/0001. Year(Get(CurrentDate)) is not a date; it is a year. As a date it translates to 2004 days (currently) since 1/1/0001, which would be 6/27/0006. So it must either be text or a number, not a date. A simpler solution would be to use Get(CurrentDate) and then format the field on the layout to display only the year. If it's only for visual purposes, I would go with this route.
Create an account or sign in to comment