Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

datatable timestamp from string


ryan42 Jul 22, 2015 06:11 AM

Hi,

Is there a way that I can get the latest TimeStamp from a DataTable using a string representation of its name?

Currently I understand using the syntax such as public.TimeStamp(5,1), this will get me the latest scans timestamp in a format I request.

However I am hoping to do something more like;
tableNames = "public"
tableTimeStamps = tableNames.TimeStamp(5,1)

Is this or could this be made possible?

Cheers
Ryan


JDavis Jul 22, 2015 04:35 PM

It is not possible the way you have it written.

Consider Public.TimeStamp to be a variable name. A string in quotes does not reference the variable.

Example:

Public myString as String
Public myOtherString as String
Public myNumber as Float

BeginProg
myNumber = 10
'The result in myString will show "myNumber"
myString = "myNumber"
'The result in myOtherString will show "10"
myOtherString = myNumber
EndProg

Log in or register to post/reply in the forum.