Normal Topic Working with dates (Read 435 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Working with dates
Oct 23rd, 2010 at 11:04pm
Print Post Print Post  
Seems that sesame will not report the 'number of days' properly. This command from the manual give the results: "0011/10/23"

WriteLN(@Date - @D("January 1, 2000"))

Any thoughts?
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Working with dates
Reply #1 - Oct 24th, 2010 at 3:19am
Print Post Print Post  
The example in the manual must be assuming that "DaysSinceY2K" is set to a Double type variable or Number type element.

Try converting the result to a number like this:
WriteLn( @TN(@Date - @D("January 1, 2000")) )

This will give you a result of 3948 (when run today 10/23/2010).
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Working with dates
Reply #2 - Oct 25th, 2010 at 2:26pm
Print Post Print Post  
Thanks Carl! I appreciate your help.
  
Back to top
IP Logged