Date Format in Filter section
-
- Posts: 15
- Joined: Thu Apr 08, 2010 12:29 am
Date Format in Filter section
Hello
I am using the filters from a WinForm application and the date format I use is dd/MM/yyyy on the Form which is correct, but on the DataBand filter the dates are entered in as MM/dd/yyyy which doesn't filter the correct results
Thank You
I am using the filters from a WinForm application and the date format I use is dd/MM/yyyy on the Form which is correct, but on the DataBand filter the dates are entered in as MM/dd/yyyy which doesn't filter the correct results
Thank You
Date Format in Filter section
Hello,
In the databand filter, when you specify a filter by date, dates are output using the date time picker.
Its result does not depend on the string format of a date.
Or maybe you use date as a string?
Thank you.
In the databand filter, when you specify a filter by date, dates are output using the date time picker.
Its result does not depend on the string format of a date.
Or maybe you use date as a string?
Thank you.
-
- Posts: 15
- Joined: Thu Apr 08, 2010 12:29 am
Date Format in Filter section
Hi Andrew
This is what I was using
Thank You
This is what I was using
Code: Select all
Datasales.Filters.Add(New StiFilter("InvoiceDate", StiFilterCondition.Between, Format(dtpDateFrom.Text, "dd/MM/yyyy"), Format(dtpDateTo.Text, "dd/MM/yyyy"), StiFilterDataType.DateTime))
Date Format in Filter section
Hello,
Please use following code:
Thank you.
Please use following code:
Code: Select all
StiDataBand dataBand = report.GetComponentByName("DataBand1") as StiDataBand;
if (dataBand != null)
{
dataBand.Filters.Add(new StiFilter("InvoiceDate", StiFilterCondition.Between, DateTime.Now, DateTime.Now));
report.Design();
}
-
- Posts: 15
- Joined: Thu Apr 08, 2010 12:29 am
Date Format in Filter section
Hi Jan
I don't understand why I would use the DateTime.Now? The dates are coming from a Form within the Report, so there is a DateFrom and DateTo. So the date range is going to be selected by the users.
Thank you.
I don't understand why I would use the DateTime.Now? The dates are coming from a Form within the Report, so there is a DateFrom and DateTo. So the date range is going to be selected by the users.
Thank you.
Jan wrote:Hello,
Please use following code:
Thank you.Code: Select all
StiDataBand dataBand = report.GetComponentByName("DataBand1") as StiDataBand; if (dataBand != null) { dataBand.Filters.Add(new StiFilter("InvoiceDate", StiFilterCondition.Between, DateTime.Now, DateTime.Now)); report.Design(); }
Date Format in Filter section
Hello,
I have provided this code only as sample. You can use your variables instead DateTime.Now. For example:
Thank you.
I have provided this code only as sample. You can use your variables instead DateTime.Now. For example:
Code: Select all
dataBand.Filters.Add(new StiFilter("InvoiceDate", StiFilterCondition.Between, date1, date2));