Jump to content

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

Recommended Posts

Posted

Hi

I have this calculation that worked fine on my old computer:

DateToText(Date(Month(Today);1;Year(Today))) & "..." & DateToText(Date(Month(Today) + 1;1;Year(Today)) - 1)

The result is: 02/01/2002...02/28/2002

This field is called Current Month. This result is used to produce monthly report. On my new computer, the year comes first = 2002/02/01.

So, my new computer cannot use the calculation because it is not a valid date.

How could I get this result:

2002/02/01...2002/02/28

thank you

Posted

Vaughan

There replies didn't help me out. So, I posted a new topic with more details.

I still can't figure out the solution. Do you?

Posted

quote:

Originally posted by Bikeman17:

Hi

I have this calculation that worked fine on my old computer:

DateToText(Date(Month(Today);1;Year(Today))) & "..." & DateToText(Date(Month(Today) + 1;1;Year(Today)) - 1)

The result is: 02/01/2002...02/28/2002

This field is called Current Month. This result is used to produce monthly report. On my new computer, the year comes first = 2002/02/01.

So, my new computer cannot use the calculation because it is not a valid date.

How could I get this result:

2002/02/01...2002/02/28

thank you

Replace "Today" with "Status(CurrentDate)" -- the "Today" command is unreliable.

Posted

Also, go into the layout mode and format the date with a custom format to show the year first.

Keep the calc in the same order; just have the layout show it in the different order.

Posted

Have you tried just switching it around? Like so:

DateToText(Date(Year(Today); Month(Today); 1)) & "..." & DateToText(Date(Year(Today); Month(Today) + 1; 1) - 1)

(Am I losing it? I know I replied to this, but it seems to have vanished! I think this has happened before, maybe I'm closing the browser window too fast.)

Posted

Fitch, the result of switching the year gives this: 02/10/0167...02/10/0167.

Dan, it doesn't change anything. The issue is not Today versus Status-current date. Even if I customize the date field, the calculation is denied.

The issue is entering a calculation = (current month) into a date field for a search. This field doesn't accept the calculation because the year doesn't come first. The solution is to place the year first in the calculation. How to achieve that?

Posted

Just a thought.

you say your new computer doesnt allow the date format mm/dd/yy but yy/mm/dd.

strange!

Try saving a clone with no records. This will set the database to your system formats.

Now try your calculation again.

Posted

Thank you for your help

I solved this problem by editing my computer settings. I tried once but I failed. I finally received help from a Windows geek. Well you know, with Windows XP, I thought things would be more easier...

Now, the date field uses a proper format: mm-dd-yyyy

Bikeman17

Posted

After I posted, I had a feeling my calc would have that problem, but I bet this would have worked (now that it's too late)... parse out the date string like this:

Year(Today) & "-" & Month(Today)& "-" & 1

etc.

This topic is 8376 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.