Hot Topic (More than 10 Replies) Subtracting Dates (Read 2073 times)
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Subtracting Dates
Apr 28th, 2010 at 4:39pm
Print Post Print Post  
Hello Again,

working in new *.db


  Days Shipped = @TN(Date Shipped) - @TN(Date RCD on Site)


If @IsBlank(Date Shipped)

    Then Days Shipped =" "


Issue1- When in Add mode, the element "Days Shipped" defaults to this large number 733,890. 
            How do you get this so this number does not show up in add mode?

Issue2- Once the "Date Shipped"  date is entered I would like the element "Days shipped" to be blank
          Code I wrote is not working right.            

thanks in advance for any help and comments.

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Subtracting Dates
Reply #1 - Apr 28th, 2010 at 5:29pm
Print Post Print Post  
Hi Dave,

You've shown us two lines of code, but not which events you have them in. Since the event controls when the code runs, we need this information to help you.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: Subtracting Dates
Reply #2 - Apr 28th, 2010 at 5:48pm
Print Post Print Post  
Days Shipped is on Element Entry
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Subtracting Dates
Reply #3 - Apr 28th, 2010 at 5:58pm
Print Post Print Post  
dcostanzo wrote on Apr 28th, 2010 at 4:39pm:
Issue1- When in Add mode, the element "Days Shipped" defaults to this large number 733,890.  
            How do you get this so this number does not show up in add mode?  


Is there anything set as the Initial Value for the Days Shipped element?

Is there any On Form Entry programming or GLOBAL CODE programming that affects the Days Shipped element?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: Subtracting Dates
Reply #4 - Apr 28th, 2010 at 6:26pm
Print Post Print Post  
Hi,

I checked on Initial Value and there is nothing set on this.

There is nothing  in the  On Form Entry programming or GLOBAL CODE programming that affects the Days Shipped element? 


  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Subtracting Dates
Reply #5 - Apr 28th, 2010 at 7:27pm
Print Post Print Post  
dcostanzo wrote on Apr 28th, 2010 at 6:26pm:
Hi,

I checked on Initial Value and there is nothing set on this.

There is nothing  in the  On Form Entry programming or GLOBAL CODE programming that affects the Days Shipped element?  



Does the value show up in Days Shipped as soon as you open a new record, or does it happen only when you enter the field?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: Subtracting Dates
Reply #6 - Apr 28th, 2010 at 7:48pm
Print Post Print Post  
It happens when you enter a new record in Add Mode or if in Update mode
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Subtracting Dates
Reply #7 - Apr 28th, 2010 at 8:33pm
Print Post Print Post  
dcostanzo wrote on Apr 28th, 2010 at 7:48pm:
It happens when you enter a new record in Add Mode or if in Update mode


Yes, but when does it happen? Does it get set as soon as the record appears, or do you have to tab into or click in the Days Shipped element?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Subtracting Dates
Reply #8 - Apr 28th, 2010 at 8:39pm
Print Post Print Post  
Can't duplicate your problem. Set up a test db and it works perfect for me.
  
Back to top
 
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: Subtracting Dates
Reply #9 - Apr 28th, 2010 at 10:19pm
Print Post Print Post  
Days Shipped Element

As soon as you open Add Mode it appears in the element on form.

You do not have to click into element or tab

So I would say as soon as record appears best describes this in Add or Update Mode.

Did you want to see the *.db  to test?
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Subtracting Dates
Reply #10 - Apr 29th, 2010 at 2:04am
Print Post Print Post  
dcostanzo wrote on Apr 28th, 2010 at 10:19pm:
Did you want to see the *.db  to test?

Yes, please send it into Support (support@lantica.com). We don't just fill in values by magic, so it must be getting set someplace.  Smiley   Send in the db and we'll try to track it down.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: Subtracting Dates
Reply #11 - Apr 29th, 2010 at 1:27pm
Print Post Print Post  
I greatly appreciate that.  I will send the *.db
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Subtracting Dates
Reply #12 - Apr 29th, 2010 at 1:29pm
Print Post Print Post  
Hello Dave,

Also include the *.dat file as well.

Thank you,
-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged