是否可以在过滤器中具有灵活的日期格式? [英] Is it possible to have flexible formatting on date in filter?

查看:56
本文介绍了是否可以在过滤器中具有灵活的日期格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

抱歉,我不知道怎么说这个问题但是这里的情况是:


我有一个允许用户应用各种过滤器的表单一份报告。其中一个过滤器是一个日期范围,用户可以输入开始日期或开始/结束日期来限制范围。在绑定到报表的表中,日期字段的格式为mm / dd / yyyy。


在表单上的代码中我使用以下内容:

Sorry, wasn''t sure how to phrase the question but here''s the situation:

I have a form that allows a user to apply a variety of filters to a report. One of the filters is a date range where user can enter either start date, or start/end date to confine the range. In the table that is bound to the report the date field is formatted mm/dd/yyyy.

In the code on the form I am using the following:

展开 | 选择 | Wrap | 行号

推荐答案

猜猜你需要使用单独的组合来完成这项任务。


我通常会根据报表所基于的年份创建年份组合。
Guess you''ll need to use separate combo''s to get this done.

I normally create a Year combo based on the year from the table the report is based on.
展开 | 选择 | Wrap | 行号


嗯。你有点失落。 :-D
Huh. You kinda lost me. :-D


我给出了如何在表单上放置组合所需的方法。

年份一年和一年组合,年份a YearMonthFrom和YearMonthTo以及DateFrom和DateTo.


基本思路是使用SELECT DISTINCT从报表所基于的表中获取值。


总是可以构造WHERE子句,具体取决于使用的过滤器组合。


用于填充的年份和格式组合'是使用BETWEEN构造WHERE子句的基本方法,如:
I gave the way how to place the combo''s needed on a form.
For the Year a YearFrom and YearTo combo, for YearMonth a YearMonthFrom and a YearMonthTo and DateFrom and DateTo.

Basic idea is to use a SELECT DISTINCT to get the values from the table the report is based on.

The WHERE clause can always be constructed, depending on the used filter combo''s.

The Year and Format used for the fill of the combo''s is the basic way to construct the WHERE clause with a BETWEEN like:
展开 | 选择 | Wrap | 行号


这篇关于是否可以在过滤器中具有灵活的日期格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆