Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

DateTime Format For GET/TrendSamples

SmartConnector Forum

Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • EcoStruxure Building
  • SmartConnector
  • SmartConnector Forum
  • DateTime Format For GET/TrendSamples
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
JeffBowman
Sisko JeffBowman Sisko
164
ardak
ardak Schneider Alumni (Retired)
34
sesa180908_brid
Commander sesa180908_brid Commander
34
mike_meirovitz
Commander mike_meirovitz
21
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to SmartConnector Forum
petri_greenwave
Lt. Commander | EcoXpert Master petri_greenwave Lt. Commander | EcoXpert Master
Lt. Commander | EcoXpert Master

Posted: ‎2017-05-09 02:51 AM

0 Likes
3
931
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-05-09 02:51 AM

DateTime Format For GET/TrendSamples

Hi All,

I am struggling a bit to get a DateTime filter going when using GET/TrendSamples.

What should the format be for this? I have tried a bunch of different formats however it keeps returning all the latest entries.

Parameter

Description

Parameter Type

Data Type

alarmId

Return only

AlarmEvent for the referenced Alarm.

Query

String

trendId

The

Id of the Trend which TrendSample are to be returned for. This parameter is not optional.

Query

String

state

Return only

TrendSample with this State value.

Query

Enumeration

(See

Table 1)

sampleOnOrAfter

Return only

TrendSample with SampleDate which is on or after this value.

Query

DateTime

sampledBefore

Return only

TrendSample with SampleDate which is before this value.

Query

DateTime

orderBy

TrendSample

will be returned in this order. SampleDateAscending by default.

Query

Enumeration

SampleDateAscending=0

SampleDateDescending=1

take

Number of

TrendSample that should be returned. 200 by default.

Query

Integer

skip

Number of

TrendSample that should be skipped before items are returned. 0 by default.

Query

Integer

Tags (1)
  • Tags:
  • get trendsamples
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
Replies 3
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-05-09 06:14 AM

0 Likes
2
904
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-05-09 06:14 AM

Any valid date format will work however, if your values do not include time zone offset or are not in UTC format, then the resulting predicate may not be what you intended.

Also, sampledOnOrAfter and sampledBefore can be used separately or in tandem.  So each side of the following expression may be omitted if the supplied value is null.

TrendSample.SampleDate>= sampledOnOrAfter && TrendSample.SampleDate< sampledBefore

Some sample requests would be helpful in determining where the issue may be.  If you are using the SOAP provider, you should enable "Ews Consume" filtering (Debug level) and you will see how your REST calls are translated into an EWS SOAP request.

Reply
petri_greenwave
Lt. Commander | EcoXpert Master petri_greenwave Lt. Commander | EcoXpert Master
Lt. Commander | EcoXpert Master

Posted: ‎2017-05-09 10:50 PM

0 Likes
1
904
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-05-09 10:50 PM

Hi Mark,

Ok Using the time format 2017-05-09T22:00:07Z did the trick. However I have a concern on how Smart Connector is handling the timestamps on the samples.

In South Africa We are GMT+2. When I run the GET/TrendSamples request it reduces the actual timestamp by 2 hours and what makes it worse is if I have a midnight sample on 2017-05-10, it incorrectly gives me a timestamp of 2017-05-09 22:00PM.

Of course it is using UTC but there must be a way to get around this:

Reply
sesa180908_brid
Commander sesa180908_brid Commander
Commander

Posted: ‎2017-05-10 06:36 AM

0 Likes
0
904
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

‎2017-05-10 06:36 AM

Petri,

All values returned by the REST Gateway should be in UTC.  With the SoapEwsRestProvider, SmartConnector is passing the values through from the server since EWS mandates that the values returned are in UTC.

Before we can determine if this might be a serialization issue in the REST layer, we need to see what SBO is returning over SOAP.

Do you have any log captures with that information?  If you enable "Ews Consume" logging filter at Debug level you will see the SOAP request/response pairs.  If the value there is correct, but the value returned over REST is not, then we may have a serialization issue. 

Reply
Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of