如何在数据编织中将yyyymmdd转换为mm-dd-yyyy [英] how to convert yyyymmdd into mm-dd-yyyy in dataweave

查看:88
本文介绍了如何在数据编织中将yyyymmdd转换为mm-dd-yyyy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个字符串1分别代表日期和第二时间.必须在Mule-dataweave

I have two string 1 represent date and 2nd time. have to convert same into date format in Mule-dataweave

输入:- s1 = 20161228(yyyymmdd), s2 = 1608(hhmm)

input :- s1= 20161228(yyyymmdd), s2= 1608(hhmm)

输出:- 日期为12-28-2016 16:08:00(mm-dd-yyyy hh:mm:ss).

output :- 12-28-2016 16:08:00(mm-dd-yyyy hh:mm:ss) in date format.

有帮助吗?

推荐答案

您可以按如下所示进行转换.

You can convert as given below.

DATUM: input as :localdatetime {format: "yyyymmdd"} as :string {format: "yyyyMMdd"},
DATUM: now as :string {format: "mm-dd-yyyy"}

有关日期格式的更多信息,请参见下面的链接.

For more about date formats see the below link.

https://docs.mulesoft.com /mule-user-guide/v/3.8/dataweave-types#dates

这篇关于如何在数据编织中将yyyymmdd转换为mm-dd-yyyy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆