A range means one of the following:
  a.. before YYYY-mm-dd(2) and after YYYY-mm-dd(1)
  b.. before YYYY-mm-dd
  c.. after YYYY-mm-dd
If you are storing the dates as seconds in your DB, and you want to find the 
largest and smallest dates, you find the largest and smallest numbers. 
To then convert them back into (just) dates use <@SECSTOTS SECS=<@COL 
"dbo.table.cell"> FORMAT="date:%Y-%m-%d"> (or whatever date format you like, 
you may prefer <@VAR system$dateFormat>)

To "extract" the records (I assume you mean find) between two dates, you would 
use this:
  dbo.table.tscolumn <= <@TSTOSECS TS=<@FORMAT <@ARG date2> 
FORMAT="datetime:<@VAR system$timestampFormat>">>
  and dbo.table.tscolumn >= <@TSTOSECS TS=<@FORMAT <@ARG date1> 
FORMAT="datetime:<@VAR system$timestampFormat>">>
Anthony - 


  ----- Original Message ----- 
  From: James Robb 
  To: [email protected] 
  Sent: Saturday, February 23, 2008 15:50
  Subject: Witango-Talk: Pulling out records based on a Date Range


  Hi 

  I am still learning WiTango and I am not sure how to extract records between 
two dates to export to a file.  I am able to pull all the reocrds from the 
table with out any problem.  The date is stored in the table using the 
<@tstosecs ts=<@currenttimestamp>> tag.  So what I need to do is create a date 
range so we can pull out the records for a specific time frame.  I know I need 
to convert the field back to a Date using this tag <@secstodate secs=<@COLUMN 
dbo.table.cell">> after this I am not sure how to create the range from the 
dates in the file, if any one can point me in the rigth direction I would much 
appreciate it.

  Best,
  James Robb 
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to