dbTalk Databases Forums  

datediff equivalent

comp.databases.filemaker comp.databases.filemaker


Discuss datediff equivalent in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Citizen10Bears@gmail.com
 
Posts: n/a

Default datediff equivalent - 11-14-2006 , 08:17 AM






good afternoon,

In my database I store a future date. (will obviously become a past
date at some point)

I need to know how many days there are between now, and the date in
question.

In VB I use datediff("d",now(),datefieldname)

How can I do this in FMP8.5?

Thanks

Tim


Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: datediff equivalent - 11-14-2006 , 09:28 AM






Hi,
In FileMaker, dates are stored as a number days after a given date (1st day
is 01/01/0001), and time as a number of seconds.
So your formula can be simply :
DaysLeft = Set Field [ Table1:aysFelt; Table1::FutureDate - Get (
CurrentDate )]
Remi-Noel

<Citizen10Bears (AT) gmail (DOT) com> a écrit dans le message de news:
1163513863.034797.150090 (AT) h54g20...oglegroups.com...
Quote:
good afternoon,

In my database I store a future date. (will obviously become a past
date at some point)

I need to know how many days there are between now, and the date in
question.

In VB I use datediff("d",now(),datefieldname)

How can I do this in FMP8.5?

Thanks

Tim




Reply With Quote
  #3  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: datediff equivalent - 11-14-2006 , 09:31 AM



Sorry, correction :

Hi,
In FileMaker, dates are stored as a number days after a given date (1st day
is 01/01/0001), and time as a number of seconds.
So your formula can be simply :
Set Field [ Table1:aysLeft; Table1::FutureDate - Get (
CurrentDate )]
Remi-Noel

<Citizen10Bears (AT) gmail (DOT) com> a écrit dans le message de news:
1163513863.034797.150090 (AT) h54g20...oglegroups.com...
Quote:
good afternoon,

In my database I store a future date. (will obviously become a past
date at some point)

I need to know how many days there are between now, and the date in
question.

In VB I use datediff("d",now(),datefieldname)

How can I do this in FMP8.5?

Thanks

Tim





Reply With Quote
  #4  
Old   
Citizen10Bears@gmail.com
 
Posts: n/a

Default Re: datediff equivalent - 11-14-2006 , 09:34 AM



"DaysFelt" - an excellent typo!

thanks for your help

Tim


Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: datediff equivalent - 11-14-2006 , 02:16 PM



In article <1163518497.759476.311620 (AT) m7g2000cwm (DOT) googlegroups.com>,
Citizen10Bears (AT) gmail (DOT) com wrote:

Quote:
"DaysFelt" - an excellent typo!

thanks for your help
As Remi-Noel says, dates within FileMaker are simply stored as "days",
so you can easily subtract one date from another to get how many days
are between the two.

Similarly, times within FileMaker are stored as seconds, so you can
simply subtract one time from another to find out how many seconds are
between them. (Of course it gets a little trickier if the times are on
two different dates.)

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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.