Thursday, February 28, 2019

Tags (Difference between Raw data and Fits

Raw Data: shows the actual data.

Here the actual time is 8:12 pm and we are taking data for last one day.
We have data at 10:00 pm 1144.784.




Here the actual time is 8:08 pm and we are taking data from 02/27 10:30 pm to 02/28 8:30 pm

at 10:30 pm there is no actual data available but it is taking avg from value at 10:00 pm and 11:00
pm










Tags (Different between .at() and .actual() )

.at(date) The interpolated value for the specified date.

.actual(date) The actual value for the specified date or the first actual prior to that date.

Example if there is value at 3:00 = 1161.505 and at 4:00 = 1160.573.





























tagname.at(daevalue("02-28-19 3:57")) = 1160.620 interpolated value.

tagname.actual(datevalue("02-28-19 3:57")) = 1161.505 that is the last value.



Tuesday, February 26, 2019

Date Function in XHQ

DateFormat (date[,format_string])


Dateformat(now(),"dd/MM/YYYY")      ------    26/02/2019

Dateformat(now(),"MM")                        ------    02

Dateformat(now(),"MMM")                    ------ Feb

Dateformat(now(),"MMMM")                 ------ February

Dateformat(now(),"dd")                        ------    26

Dateformat(now(),"dd")                        ------    26

Dateformat(now(),"yy")                        ------    19

Note: "MM" indicates for month and "mm" indicates for minute.

DateFormat(DateValue("10-01-00"),"EEEE, MMMM, d yyyy hh:mm a zzzz")

Returns a string: "Sunday, October, 1 2000 12:00 AM Pacific Daylight Time"

Given: Now()=6-Nov-00 10:15:15 PST
DateFormat("dd MMMM yy HH'h'mm")   --Returns a string: "06 November 00 10h15"

DateFormat("M/d/y  HH:mm:ss.SSSS")   --- Returns a string: "11/6/00 10:15:15.892"

Convert timestamps to a string.
DateFormat("d-MMM-yyyy HH:mm:ss.SSSS z") --8-Apr-2000 15:38:17.456 PDT

DateFormat("M/d/y HH:mm")                 -----4/8/00 15:38

DateFormat("MMMM d, yyyy h:mm")   -----April 8, 2000 3:38

DateFormat("M/d/y")                               -----8/4/00


Support special absolute and relative times.

DateStart("month")  ---"beginning of this month" (midnight on the 1st)
"end of last month" (one millisecond

DateEnd("month",DateValue("10-01-00")) ---before midnight on the last day of the
previous month).Given: The current month is November.

DateEnd("day") --"beginning of day" (midnight today) DateStart("day")
"end of day" (one millisecond before
midnight yesterday)

DateAdd("day",-,DateStart("day")) - "beginning of yesterday" (a 24 hour
period beginning at midnight yesterday)


DateAdd("week",-1) - "last week" (a seven day period beginning
at midnight on Sunday of last week)

DateAdd("day",1) - "tomorrow"
Date()   - "today"

Now()   - "now"