0
Waiting for user's reply

DATETIME on database

Francesco Zangara 8 years ago in Server Solutions updated 8 years ago 3

Simple, how to obtain a "human readable" date from DATETIME column? Or how to convert a "human readable" date to DATETIME column format?

Waiting for user's reply

Hello!


You mean in SCV file?

I extract DATETIME for system database with this code.

<code>

var db = IR.GetDatabase();

var tag_id = sql.Request('SELECT TAG_ID FROM TAGS_PASSPORT WHERE NAME = "KNX.UPS - Power"').GetRowValue(0,0);
var req = sql.Request('SELECT VALUE FROM FLOAT_TAG_HISTORY WHERE TAG_ID = ' + tag_id);
IR.Log(req.GetRowValue(0,0));

</code>

but i also open a copy of db with an sql viewer.

In same case i have an value in real format.


and if i need search a value by date, what is the correct query?