我需要捕获文件的最后修改日期yyyy-MM-dd format
。时间戳转换骡esb
我试过#[message.inboundProperties.timestamp]
,但得到的时间戳为142565954
。
是的,我知道它可以使用goovy或java来完成。
请有人建议用mule表达式语言将时间戳142565954
转换为yyyy-MM-dd
格式?
我需要捕获文件的最后修改日期yyyy-MM-dd format
。时间戳转换骡esb
我试过#[message.inboundProperties.timestamp]
,但得到的时间戳为142565954
。
是的,我知道它可以使用goovy或java来完成。
请有人建议用mule表达式语言将时间戳142565954
转换为yyyy-MM-dd
格式?
请参考以下链接: https://docs.mulesoft.com/mule-user-guide/v/3.6/mule-expression-language-date-and-time-functions
尝试是这样的:
#[new org.mule.el.datetime.DateTime(new Date(message.inboundProperties.timestamp),"E MMM dd HH:mm:ss z yyyy")]
那时间戳(message.inboundProperties.timestamp)是消息的时间戳,而不是文件的时间戳。
试试这个,这对工人我server.dateTime
#[message.inboundProperties.timestamp.format('yyyy-MM-dd')]
如果使用内dataweave那么请写成message.inboundProperties.timestamp为:{日期格式: “YYYY-MM-DD” }