如何将 datetime类型转化为string类型?

小程序 文章 2022-04-06 09:20 1664 0 全屏看文

AI助手支持GPT4.0

如何将 datetime类型转化为string类型?How to convert datetime type to string type?

如何将 datetime类型转化为string类型?

如图,ReleaseTime在数据库是DateTime类型,在小程序获取后成为如图的数据,在网上搜索,大部分是时间戳转化为字符串,感觉跟我遇到的问题不同。求大佬给个思路

As shown in the figure, releasetime is of datetime type in the database, which becomes the data shown in the figure after being obtained by the applet. When searching on the Internet, most of the time stamps are converted into strings, which feels different from the problems I encounter. Ask the boss for a thought

回答:

romantik:232
小黎:

releaseTime.split("T")[0]+" "+releaseTime.split("T")[1].split(".")[0]

武曲心:

moment.js或者在渲染是用wxs转换

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
服务端订阅消息发送总是返回40003,appid,access-token和touser是对应的?
微信小游戏wx.createInnerAudioContext()快速连续点击播放音效延迟?
只有一条数据,被渲染两次,怎么解决?
关于微信开放平台绑定的服务号产生UnionID的问题?
开发工具新版本,肯定是架构师亲自写代码了吧?
随便看看
小程序测试号解绑之后,扫一扫小程序登录又回来了 2034
微信公众号openid? 2276
微信开放平台跟公众平台有什么区别? 3518
怎么添加小程序支付功能? 4313
教育科技公司申请微信支付被拒绝? 4695
微信公众号免300认证教程 5777
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 5188
小程序广告组件通过审核,但是小程序内没有显示广告? 4962
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9391
问题? 8911