Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7282 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

What do you get if you have the result of Text? smile.gif The field result has to be text. When you select date, FileMaker is trying to make 2004 into XX/XX/XXXX.

HTH

Lee

Posted

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!!!

Posted

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.

This topic is 7282 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.