ParameterBinding Name="PToDate" Location="Control(CalTo,SelectedDate)" DefaultValue=""
Convert the date into number (YYYYMMDD)
number(string(ddwrt:FormatDateTime(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date),1033,1)),'/','-'),1060,'yyyyMMdd'))) >= number(string(ddwrt:FormatDateTime(translate(string(ddwrt:FormatDate(string($PFromDate),1033,1)),'/','-'),1060,'yyyyMMdd'))) and number(string(ddwrt:FormatDateTime(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date),1033,1)),'/','-'),1060,'yyyyMMdd'))) <= number(string(ddwrt:FormatDateTime(translate(string(ddwrt:FormatDate(string($PToDate),1033,1)),'/','-'),1060,'yyyyMMdd')))
old: Wrong Calc
number(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1)),'/','')) >= number(translate(string(ddwrt:FormatDate(string($PFromDate), 1033, 1)),'/','')) and number(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1)),'/','')) <= number(translate(string(ddwrt:FormatDate(string($PToDate), 1033, 1)),'/',''))
new
Ref:
number(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1)),'/','')) = number(translate(string(ddwrt:FormatDate(string($PFromDate), 1033, 1)),'/',''))
ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1) >= ddwrt:FormatDate(string($PFromDate), 1033, 1) and ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1) <= ddwrt:FormatDate(string($PToDate), 1033, 1)
number(translate(string(ddwrt:FormatDate(string(@Report_x0020_Date), 1033, 1)),"/",""))
number(translate(string(ddwrt:FormatDate(string($PFromDate), 1033, 1)),'/',''))