Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PowerBuilder Datawindow Filter Function Dependant upon Regional Setting's Date format

2 views
Skip to first unread message

meiyiao

unread,
Jan 23, 1998, 3:00:00 AM1/23/98
to

Hello,

When trying to filter the data from datawindow using a date field as the
criteria, the date format is dd/mm/yy
the filter function has no effect . The pc's date format is checked and it
is having a mm/dd/yy setting. When the filter criteria is changed to
mm/dd/yy format ...similar to pc settings, the filter works.
PowerBuilder Datawindow Filter Function seems to depend on Control Panel,
Regional Setting's Date format when filtering.
Can i predefine the date format so that it will be following my data's
date format. Anybody out there knows wat's the way of doing this , please
advice..

Thank You!!


Scott M. Peck

unread,
Jan 23, 1998, 3:00:00 AM1/23/98
to

meiyiao wrote in message <01bd27d3$2e5d6fa0$677b74cb@pc-meiyiao>...

It may help to convert all elements in your filter expression to dates using
the Date function. This will ensure you are not comparing apples to
oranges. With this approach, I don't think the pc's settings come into
play.

Example:

ls_filter = "Date(last_access_dt) >= Date('" + String(ld_date, 'mmm dd,
yyyy') + "')"

Hope that helps.

Anita van Heerden

unread,
Jan 26, 1998, 3:00:00 AM1/26/98
to

meiyiao <mei...@cyberway.com.sg> wrote in article

<01bd27d3$2e5d6fa0$677b74cb@pc-meiyiao>...
> Hello,
>
> When trying to filter the data from datawindow using a date field as the
> criteria, the date format is dd/mm/yy
> the filter function has no effect . The pc's date format is checked and
it
> is having a mm/dd/yy setting. When the filter criteria is changed to
> mm/dd/yy format ...similar to pc settings, the filter works.
> PowerBuilder Datawindow Filter Function seems to depend on Control
Panel,
> Regional Setting's Date format when filtering.
> Can i predefine the date format so that it will be following my data's
> date format. Anybody out there knows wat's the way of doing this , please
> advice..
>
> Thank You!!
>
>

Have you tried the following in your filter command:?

dw_1.SetFilter('string(dwdate, "dd/MM/yyyy") = "26/01/1998"')

where dwdate is the date field in you dw. This will not be affected by
whatever is defined in your Regional Settings.


--
Anita van Heerden
ani...@hollard.co.za

0 new messages