How to make a default value of the current year

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

Hello.

I'm trying to make a default value of the current year for a specific field.

I'm trying to use this: Right((Now();'Short Date');4) but when I'm
saving is not working.


What's wrong?

Regards,
Marco
 
Marco said:
Hello.

I'm trying to make a default value of the current year for a specific
field.

I'm trying to use this: Right((Now();'Short Date');4) but when
I'm saving is not working.


What's wrong?

With your expression? Just about everything :-)

Just use Year(Date())
 
"Short Date" works with the Format function. Your use of it in the Right
function is not going to do anything, AFAIK. The Year function is a better
way of extracting the year portion of a date: Year(Date()), but if you
already have the date in the record there is no need to store the year also.
Just use the Year function when you want to display the year.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top