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

小程序 文章 2022-04-06 09:20 1694 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群

相关文章
当前数据统计延迟,请稍后查看?
云开发_id后怎么变成阿拉伯数字?
想要删除已发内容,扫码确认总是提示扫码失败,更新二维码,这是什么原因?
请问小程序能否直接调用手机端的图片并在相应页面显示?
如何隐藏小程序主体信息?
随便看看
小商店是微信小程序的一种,流量来源里面注明了,全局搜索搜一搜,为什么我的小商店在搜一搜搜索不到? 628
请问哪里混淆官方服务功能? 656
wecenter常用方法 986
一个人做了个小程序 520
调用wx.getUserProfile时报错了? 955
已有小程序如何绑定视频号? 598
sendBizRedPacket:fail scene 1001 not support?怎么解决 968
form组件formSubmit按钮触发不了? 450
web-view里h5页面可以打开其他小程序吗? 465
微信环境内可以通过url,拉起小程序并打开小程序的某个页面吗? 584