I have some data in a dataset in a table. I want to use :
dateExtract({Root Container.Alarms.AlarmTable.data}[0,“clear_time”],“second”) to get the seconds value of the datetime value in the table (Row 0 in column clear_time). I always get a ‘Argument 0 is an invalid type’ error. I tried to cast it to a date with the toDate cast but get the same results. Any suggestions?
You will have to cast the date that you pull out of the table. I know you said you did this, but maybe you had some syntax problem? The expression should look like this:
dateExtract(toDate({Root Container.Alarms.AlarmTable.data}[0,"clear_time"]), "second")
Hope this helps,
Thanks, it did get rid of the previous error but now I get: Unable to cast ‘11/5/2007 11:51:02 AM’ to a date.
Ah, I suspect that your column is actually a string, not a date. What does the query look like that is populating the table? Also, is the field a datetime in the database?
You were right. The query used DateFormat to convert the DateTime to a string. I will have to redo the query…
Thanks for your help[/code]