Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Support Forum



Date comparisons
tannagx asked:
I've run into a new date issue. I need the dates to be the same, but this expression is taking time into consideration. How do I remove the time from these comparisons:

<ws:datasource src="StarbucksReload" filter="=ReloadDate == '#today#' " />

Thank-you!
Tanna
 
  dougl responded:
  today = new Date( today.getYear(), today.getMonth(), today.getDate() );  
  tannagx responded:
  How would I do this to ReloadDate? It seems that the time comparison comes into play when both dates have a time.  
  dougl responded:
  How about:

today = new Date( today.getYear(), today.getMonth(), today.getDate() );

// today + one day in milliseconds
var tomorrow = new Date( today + 1000 * 60 * 60 * 24 );


"=ReloadDate >= '#today#' AND ReloadDate < '#tomorrow#'"
 
  dougl responded:
  This is even better:

"DATEDIFF(day, ReloadDate, '" + today + "') < 1"
 
  tannagx responded:
  This one worked:

filter="=DATEDIFF(day,ReloadDate, '#today#') &lt; 1
"

Thanks Doug!
Tanna
 
  dougl responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us