Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I wish to receive a result date in this form:
yy (06), only the two last numbersof the year.
The problem is i always receive it yyyy(2006), even if i change it to yy.
It's possible to solve this?
 
Nelson,

Is this from a query? From code? In a textbox?

Either way, you can use the Format function to display the date how you
want. Something like this:

Format(MyDateValueOrField,"yy")

Barry
 
Hi Barry.

I'm working directly on a form and using the builder expression. The retrive
is with format date. Altough, it retrieves me always yyyy. I've already
changed it to yy but nothing. In Excel it works.
By the way, i'm portuguese and i supose you're english, so i can't wish you
good luck tomorrow.
 
Make sure you have *not* checked the boxes under:
Tools | Options | General | Use 4-digit years

Those settings override everything.
 
If you're using the Format property of a textbox, it should be a simple
matter of using yy. Are you using the format property or something else?

And yes, good luck tomorrow. I've moved on to the Tour de France and have
high hopes for the Americans.

Barry
 
Hi. It was not checked.

Any other ideas?

Nelson Silva


"Allen Browne" escreveu:
 
i'm using a textbox. But it's not a simpe matter of "yy". It doesn't work. In
Excel yes. Any other options?

I'm getting real desperate.
 
Brute force?

=Right(Format(MyDateValueOrField,"yy"),2)

HTH,
Kevin
 
sorry for the ignorance, but where do i write that message and i should write
it exactly like you have wroted it?
 
Select the textbox in form design mode.
Open the Properties and switch to the Data tab.
In the Control Source property, type:

=Right(Format(X,"yy"),2)

Replace the X with the name of the your field that stores the date. If
the field name has spaces or other special characters in it, like:

Date of Hire

....you need to enclose the field in square brackets:

=Right(Format([Date of Hire],"yy"),2)

HTH,

Kevin
 
Thanks My friend
--
Nelson Silva


"Kevin K. Sullivan" escreveu:
Select the textbox in form design mode.
Open the Properties and switch to the Data tab.
In the Control Source property, type:

=Right(Format(X,"yy"),2)

Replace the X with the name of the your field that stores the date. If
the field name has spaces or other special characters in it, like:

Date of Hire

....you need to enclose the field in square brackets:

=Right(Format([Date of Hire],"yy"),2)

HTH,

Kevin

sorry for the ignorance, but where do i write that message and i should write
it exactly like you have wroted it?
 

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