使用 SQL 更新 FileMaker 时间戳字段
我需要使用从 PHP 获取的时间戳更新 FileMaker 时间戳字段,并使用 PHP API 和执行 SQL API 和插件将其放入脚本中,
因此
UPDATE table SET time ='2011-05-27 11:28:57'
我的问题如下,如何利用 Filemaker Pro 11 中的可用脚本函数将在 SQL 语句中以 FileMake 可接受的时间戳格式提供的字符串?或者是否可以使用 FileMaker 的executeSQL 插件在执行SQL 插件的ExecuteSQL() 函数内进行转换?
I need to update a FileMaker Timestamp field with a timestamp taken from PHP and put into a script using the PHP API and executeSQL API and plugin
so
UPDATE table SET time ='2011-05-27 11:28:57'
My Question is as follows, how do I utilise the available scripting functions within Filemaker Pro 11 to convert the string that is being supplied within the SQL statement to an acceptable TimeStamp format for FileMake? or is it possible using the executeSQL plugin for FileMaker to do the conversion within the ExecuteSQL() function within the Execute SQL plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有尝试过,但它应该使用 CAST 工作:
所以,它应该显示为:
但是,请注意 Filemaker 自己的 ExecuteSQL() 函数不支持 UPDATE 或 INSERT INTO 语句。为了执行此操作,您需要从 Dracoventions 获取名为 epSQLExecute() 的免费扩展。
希望这对(某人)有帮助。
加里
I haven't tried it out, but it should work using CAST:
so, it should read:
However, please be aware that Filemaker's own ExecuteSQL() functions doesn't support UPDATE or INSERT INTO statements. You need to get a free extension from Dracoventions called epSQLExecute() in order to do this.
Hope this helps (someone).
Gary
您没有给我们太多信息,但我的猜测是您正在使用与所需格式不匹配的字符串更新时间戳列。
您应该将字符串转换为适当的对象,然后更新应该可以工作。
You haven't given us much to go on, but my guess would be that you are updating a timestamp column with a string that does not match the required format.
You should convert your string to the appropriate object and then the update should work.