Citect - Timestamp at TrnExportCSV function

Dariusch

Member
Join Date
Sep 2003
Posts
284
Hi All.

I am have some trouble make this function work when not using the "TimeCurrent()" function.

I have the following code:

FUNCTION DSA_EksportCSV_Sillem1301()

TrnExportCSV("c:\Sillem1301_Test1.csv", TimeCurrent(), 1, 60*60, 1, "Trend_1")

END

This function work ok. But when try to make change the "TimeCurrent()" to string it will make the file but without timestamp or data.
This is what I have tried to make

FUNCTION DSA_EksportCSV_Sillem1301()

TrnExportCSV("c:\Sillem1301_Test1.csv", 19/05/06:20:00, 1, 60*60, 1, "Trend_1")

END

At the end I would change the actual date/time with 2 variables, but to test i just made this above.

Thank you

Dariusch
 
Hello,

the timecurrent function is the time in seconds since somewhere 1970 ...

if you want to specifie a date use the StrToTime() and StrToDate functions to convert the time to the correct format.

hope this helps,

Marsupilami
 
Last edited:
Hi Marsupilami

THANK YOU FOR POINTING THE DIRECTION FOR ME ;)

This is the result:

TrnExportCSV("c:\Sillem1301_Test1.csv",(StrToDate("19-05-06")+StrToTime("19:00:00")), 1, 60*60, 1, "Trend_1")

Thank you again.

Dariusch
 

Similar Topics

Hello, the system we use is Scada 7.5 series. We have usb key activ now we need additional key to make the system work, how do we solve this...
Replies
0
Views
28
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
67
Hello, i've been at this for months now, i tried creating accounts on the aveva website but it seems to never approve my accounts or at least when...
Replies
3
Views
97
Hello, I have a running project on Citect v5.42 and simatic net v6.4 I have created a new spare PC and loaded all software like Citect, station...
Replies
0
Views
76
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
83
Back
Top Bottom