Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
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#' " />

  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!
  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.

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