dbTalk Databases Forums  

Date confusion

comp.databases.filemaker comp.databases.filemaker


Discuss Date confusion in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff Wright
 
Posts: n/a

Default Date confusion - 02-17-2007 , 05:52 AM






Oh Dear!

The simplest of things seem to bring me to a grinding halt!

Using FM8.5 advanced on Windows XP.

I have set up a field, which is a date field. After entry of a date, using
the drop down calendar, I attempt to make a copy of this entered data into
another field (also a date field) of another table using a script. The
script is all set up, but I get the wrong date in the new record. It seems
that the day is getting confused with the month. For example I enter
03/02/2007 (UK version which means 3 February 2007) and in the new record I
get 2 February 2007. The day is always the same as the month, so if I enter
04/09/2007, I get 9 September 2007 in other field.

Perhaps my coding would help:

Set variable [$line; Value:Removals::rem_date_line]
Set variable [$ref; Value:Removals::rem_ref]
Go to Layout ["Dates" (Dates)]
New Record/Request
Set Field [Dates::dat_rem_ref; $ref]
Set Field [Dates::dat_date; $line]
Go to Layout [original layout]

I must be making a simple error somewhere, but so far it is eluding me!

--
Jeff Wright



Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Date confusion - 02-17-2007 , 07:34 AM






I have rebuild your solution and tried it without any errors. So the only
thing I can think of is that perhaps your target field is not a date field.

Ursus

"Jeff Wright" <jeff (AT) jeffwright (DOT) demon.co.uk> schreef in bericht
news:er6q9i$kdb$1$8300dec7 (AT) news (DOT) demon.co.uk...
Quote:
Oh Dear!

The simplest of things seem to bring me to a grinding halt!

Using FM8.5 advanced on Windows XP.

I have set up a field, which is a date field. After entry of a date, using
the drop down calendar, I attempt to make a copy of this entered data into
another field (also a date field) of another table using a script. The
script is all set up, but I get the wrong date in the new record. It seems
that the day is getting confused with the month. For example I enter
03/02/2007 (UK version which means 3 February 2007) and in the new record
I get 2 February 2007. The day is always the same as the month, so if I
enter 04/09/2007, I get 9 September 2007 in other field.

Perhaps my coding would help:

Set variable [$line; Value:Removals::rem_date_line]
Set variable [$ref; Value:Removals::rem_ref]
Go to Layout ["Dates" (Dates)]
New Record/Request
Set Field [Dates::dat_rem_ref; $ref]
Set Field [Dates::dat_date; $line]
Go to Layout [original layout]

I must be making a simple error somewhere, but so far it is eluding me!

--
Jeff Wright





Reply With Quote
  #3  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Date confusion - 02-17-2007 , 09:58 AM



Could be a problem with one of the fields not really being a date field
or with the variable somehow not interpreting your value as a date.

But I'm going to lean toward it being a simple formatting problem on the
layout where you're looking at the Dates layout. Check date formatting
for that field and make sure you don't accidentally have it set to show
MM/MM/YYYY.


Jeff Wright wrote:
Quote:
Oh Dear!

The simplest of things seem to bring me to a grinding halt!

Using FM8.5 advanced on Windows XP.

I have set up a field, which is a date field. After entry of a date, using
the drop down calendar, I attempt to make a copy of this entered data into
another field (also a date field) of another table using a script. The
script is all set up, but I get the wrong date in the new record. It seems
that the day is getting confused with the month. For example I enter
03/02/2007 (UK version which means 3 February 2007) and in the new record I
get 2 February 2007. The day is always the same as the month, so if I enter
04/09/2007, I get 9 September 2007 in other field.

Perhaps my coding would help:

Set variable [$line; Value:Removals::rem_date_line]
Set variable [$ref; Value:Removals::rem_ref]
Go to Layout ["Dates" (Dates)]
New Record/Request
Set Field [Dates::dat_rem_ref; $ref]
Set Field [Dates::dat_date; $line]
Go to Layout [original layout]

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #4  
Old   
Jeff Wright
 
Posts: n/a

Default Re: Date confusion - 02-17-2007 , 01:26 PM



Yes your both quite right. The script is working as it should. It was a
formatting problem with the layout. I have the date (which is in a portal)
to show the full Monty ie. Saturday 17 February 2007, and I set it up all
correctly with the exception of the day of the month, which I set to a 2,
but that 2 represents the month number not day number. I must have checked
that a hundred times earlier today, and didn't spot it!

Many thanks!!

Back to work...

--
Jeff Wright


"Howard Schlossberg" <howard (AT) antispahm (DOT) fmprosolutions.com> wrote

Quote:
Could be a problem with one of the fields not really being a date field or
with the variable somehow not interpreting your value as a date.

But I'm going to lean toward it being a simple formatting problem on the
layout where you're looking at the Dates layout. Check date formatting
for that field and make sure you don't accidentally have it set to show
MM/MM/YYYY.


Jeff Wright wrote:
Oh Dear!

The simplest of things seem to bring me to a grinding halt!

Using FM8.5 advanced on Windows XP.

I have set up a field, which is a date field. After entry of a date,
using the drop down calendar, I attempt to make a copy of this entered
data into another field (also a date field) of another table using a
script. The script is all set up, but I get the wrong date in the new
record. It seems that the day is getting confused with the month. For
example I enter 03/02/2007 (UK version which means 3 February 2007) and
in the new record I get 2 February 2007. The day is always the same as
the month, so if I enter 04/09/2007, I get 9 September 2007 in other
field.

Perhaps my coding would help:

Set variable [$line; Value:Removals::rem_date_line]
Set variable [$ref; Value:Removals::rem_ref]
Go to Layout ["Dates" (Dates)]
New Record/Request
Set Field [Dates::dat_rem_ref; $ref]
Set Field [Dates::dat_date; $line]
Go to Layout [original layout]

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.