Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Date Strings in Datawindow Filters

Status
Not open for further replies.

StevenHB13

IS-IT--Management
Apr 19, 2012
3
US
In a number of datawindows in my application, users have access to a free-form text box where they can enter any filter string they like. Frequently, they will use a search term like:
Code:
date(last_updated_date) = 2010-10-22

I'm trying to update some documentation and have been asked to address this syntax in particular. So my question is, how does PowerBuilder know that "2010-10-22" is a date and what are the rules for including date literals like this one without specific conversion? Is it based upon the fact that the left-hand value is clearly a date datatype or is it based upon the particular date format used in "2010-10-22" or both?
 
Thanks, Walt. I think that you misunderstand: the comparison works as-is. My question is why and what are the rules that allow it to work?
 
Some of the rules are based on the Regional settings on the computer (see the Control Panel). I'm sure 2012-04-20 would work but 12-04-20 might not (although PB does 'guess' at the century for two digit years).

I've not seen a list of valid date formats for filters like yours.

Matt

"Nature forges everything on the anvil of time"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top