How to extract value from datalog of specific date & time

I need to read value from data log of specific date & time (suppose requires value logged yesterday at 16:30:00 time) I need to use that value for mathematical operation. Please tell me how to do it.

Will you always need to be grabbing the same value from the same time period? Or is this an individual example?

I need to read value of specific date & time. I tried following. but error is coming.
GET Tagname,"&[$dtHL$ftB$st17102020_233000$tnFREQUENCY$et17102020_233000]"
Datatype of Tagname is integer. I need to use that value further for mathematical operation.
Please tell me how to do this. thank you.

Will it always be this same tag value that you’re grabbing at the same time every day?

yes date will be different but time will be same

You would need to use the EBD like you’re showing above and then parse the data so that you’re only reading the section of the line that’s assigned to that tag value at that specific time. You’ll also need to write something that will update the time that you’re going to be grabbing this tag value from. Here’s some examples on parsing data that might be useful for you,

https://techforum.ewon.biz/thread-418.html

Once you’ve parsed the data and stored the current value as either a tag or a variable, you can then use that value for what you need to.

GET Tagname,"&[$dtHL$ftT$st17102020_233000$tnFREQUENCY$et17102020_233000]"

But this is giving me error not the string of data

I think you might be confused about the way the GET command behaves, can you take a look at page 40/112 of the doc below to look at the syntax of the command and how it behaves

OPEN “exp:&[$dtHL $ftT $st23102020_144150 $et23102020_144151 $tnCURRENT_R]” FOR TEXT INPUT AS 1
IF AAD@<> “” THEN GOTO Loop
Loop:
AAD@ = Get 1
AAD@ = Get 1
Print AAD@
By using this I have got the string.
1603464110;“23/10/2020 14:41:50”;0;9.96;3
but I don’t understand how to get the value from this(9.96 in this string)

Here’s an example for extracting a specific value from a line

Function SplitString$ ($StringToParse$,$Pos%, $char$)

$e% = 1
$loopnbr% = 0
$NextLine:
$f% = INSTR $e% , $StringToParse$ , $char$
PRINT STR$ $f%
//LAST ELEMENT
IF $f% = 0 THEN
$B$ = $StringToParse$( $e% TO LEN $StringToParse$)
GOTO $EndOfLine
ENDIF
$loopnbr% = $loopnbr% + 1
$B$ = $StringToParse$( $e% TO $f%-1)
IF $Pos% = $loopnbr% THEN GOTO $EndOfLine
$e% = $f% + 1 //REM Init for next loop/line
GOTO $NextLine
$EndOfLine:
$SplitString$ = $B$
EndFn`

PRINT @SplitString$("192.168.120.1",2,".") // will print "168"

so you could either create a variable equal to the value being grabbed from that splitstring variable or create a tag to assign that value to

I am getting string when I am using EBD directly. like
OPEN “exp:&[$dtHL $ftT $st23102020_144150 $et23102020_144151 $tnCURRENT_R]” FOR TEXT INPUT AS 1

But when I am using Tag which contains EBD then I am getting error.
OPEN Tagname

Tagname contains “exp:&[$dtHL $ftT $st23102020_144150 $et23102020_144151 $tnCURRENT_R]” FOR TEXT INPUT AS 1
I need EBD customizable. Please tell me how to do it.

What is the error that you’re getting in the console? If you’re able to get the string and parse it, you should be able to just make a tag and then set that tag value to be equal to the section that you’re parsing.

It also looks like the EBDs that you’re using are the same when you say you’re getting the string as when you say you’re getting the error?

Syntax error(0) 125 : Open SK_LINK@

this error is coming when I am using Tag which contains
exp:&[$dtHL $ftT $st23102020_144150 $et23102020_144151 $tnCURRENT_R]

I don’t think I understand, why are you trying to open a tag?

The tag is defined in the EBD here:

exp:&[$dtHL $ftT $st23102020_144150 $et23102020_144151 $tnCURRENT_R]

You should be able to just modify that section after $tn