Bikeman17 Posted February 26, 2002 Posted February 26, 2002 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
Bikeman17 Posted February 27, 2002 Author Posted February 27, 2002 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?
danjacoby Posted February 27, 2002 Posted February 27, 2002 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.
danjacoby Posted February 27, 2002 Posted February 27, 2002 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.
Fitch Posted February 27, 2002 Posted February 27, 2002 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.)
Bikeman17 Posted February 27, 2002 Author Posted February 27, 2002 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?
andygaunt Posted February 27, 2002 Posted February 27, 2002 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.
Bikeman17 Posted February 27, 2002 Author Posted February 27, 2002 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
Fitch Posted February 27, 2002 Posted February 27, 2002 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now