MYOBCommunity
Partner Zone
|
|
Partner Zone

Date Filters PayRollAdvice

1 REPLY
Contributing Partner Buda56
18 Posts
Contributing Partner
Buda56
Contributing Partner

18Posts

0Kudos

3Solutions

Accepted Solution Solved Solution

Re: Date Filters PayRollAdvice

Found the problem:

string filter = string.Format("$filter=PayPeriodStartDate eq '{0:yyy-MM-dd}' and PayPeriodEndDate eq '{1:yyyy-MM-dd}'", dteSDate.DateTime, dteSDate.DateTime.AddDays(6));

 

1. Filter work is lower case

2. Doesn't require the hours, minutes and seconds (causes validation errors)

 

Regards

Peter

Highlighted
Contributing Partner Buda56
18 Posts
Contributing Partner
Buda56
Contributing Partner

18Posts

0Kudos

3Solutions

Solved: Go to Solution

Date Filters PayRollAdvice

Hi,

    I ma trying to filter against the Employee Payroll Adive Service using dates on the PayPeriodStart and PayPeriodEnd Dates, this has been unsuccessful to date as it seems to ignore the dates (see code below). I have tried different variations of date setting asll to no avail.

We are developing against a local network file using the API.

 

C# Code:

EmployeePayrollAdviceService epas;
epas = new EmployeePayrollAdviceService(config);
string filter = string.Format("$Filter=PayPeriodStartDate ge '{0:yyy-MM-dd 00:00:00}' and PayPeriodEndDate le '{1:yyyy-MM-dd 00:00:00}'", dteSDate.DateTime, dteSDate.DateTime.AddDays(6));
var pAdvice = epas.GetRange(companyFile, filter, credentials);

 

Can you please advise how we can filter to a required date range, also I can't find any documentation on how to utilise paginfg when returned results are greater than the limits, could you please supply some code showing how to implement and loop threough paged results.

 

Many Thanks

Peter

 

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post