First time here? Check out the FAQ!
0

DateTime=YYYY-MM-DDTHH:MM:SS+ Syntax Returns No Results

In my query, I am having trouble using the RETS DMQL2 syntax for date comparisons. I'm using rets/1.5. I am properly authenticated and other queries work fine.

http://rayac.rets.fnismls.com/rets/fnisrets.aspx/RAYAC/Search?rets-version=rets/1.5&SearchType=Property&Class=RF_1&Count=0&Query=(L_UpdateDate=2016-11-15T00:00:00+)&QueryType=DMQL2

So This query returns no results:
  Query=(L_UpdateDate=2016-11-15T00:00:00+)

but this query returns one record (an exact match):
  Query=(L_UpdateDate=2016-11-15T00:24:00)

To make sure I understand the datetime field, I've tried stuff like:
  Query=(L_UpdateDate=2016-11-01T00:00:00+)
with no results. There should be many results, as I have verified using other methods

Any ideas? Does Paragon support the DQML2 '+' syntax for dates and datetimes?

Thanks

--Glen Mann

Glen Mann's avatar
Glen Mann
asked 2016-11-16 07:04:24 -0500, updated 2016-11-16 07:22:49 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

Glen,

When I look at what I assume are your search requests in our RETS logs this is what I am seeing:

(L_UpdateDate=2016-11-01T00:00:00 )

(L_UpdateDate=2016-11-01T00:24:00 )

(L_UpdateDate=2016-11-10T00:24:00 )

(L_UpdateDate=2016-11-10T00:24:00)

(L_UpdateDate=2016-11-15T00:00:00 )

(L_UpdateDate=2016-11-15T00:24:00 )

(L_UpdateDate=2016-11-15T00:24:00)

(L_UpdateDate=2016-11-16T00:24:00 )

(L_UpdateDate=2016-11-16T00:24:00)

It looks like you are not URL encoding the + sign so it is just coming across as a space.

Also our DATETIME values are in UTC.

You may already know but there is a project in GitHub called PHRETS for PHP can make it easier to work with RETS.

"https://github.com/troydavisson/PHRETS"

bwolven's avatar
bwolven
answered 2016-11-16 11:40:09 -0500, updated 2016-11-16 13:45:05 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

You are correct. I somehow did not think about that, so
  (L_UpdateDate=2016-11-16T00:00:00%2b)
works as expected.

Thanks for the speedy answer to a defacto silly question.

Concerning PHRETS, I tried it and found the lack of documentation, hidden functionality, complexity, and the numerous other included components unsuitable for me. The '+' issue aside, it's been quicker for me to use straight PHP and curl, and the CLI with curl for certain scheduled events. After all, the entire RETS universe seems to revolve around correctly formulating URLs and parsing the results.

I'm about to "Answer my own question..." since the comment length is limited.

Glen Mann's avatar
Glen Mann
answered 2016-11-16 14:33:55 -0500
edit flag offensive 0 remove flag delete link

Comments

Good to hear. I would suggest you set your RETS Version to RETS/1.8 or RETS/1.7.2 to position for the future. Also you may want to use one of the compact formats since Paragon currently only supports a limited number of fields in the STANDARD-XML format.

bwolven's avatar bwolven (2016-11-16 14:54:42 -0500) edit

Yes I normally use the COMPACT format. I asked our local MLS/RETS admin why I was given a version 1.5 login URL rather than 1.7.2 or 1.8, but do not yet have an answer. Do you know if RAYAC supports 1.7.2 and/or 1.8? Simple URLs seem to work in any version. Thanks!

Glen Mann's avatar Glen Mann (2016-11-16 15:29:15 -0500) edit

Yes. It supports all 3 of those RETS versions. Probably just old information.

bwolven's avatar bwolven (2016-11-16 16:15:54 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer