微信小程序字符串转日期Date

news/2024/7/20 3:34:36 标签: 小程序, 字符串转date

that.data.reportDate为日期数据

var date=new Date(that.data.reportDate.replace(/-/g, "/"));


http://www.niftyadmin.cn/n/948875.html

相关文章

记录 my.optionsSelect的坑

<view class"level"> <text class"key">巡查结果</text> <text class"value" onTap"selectStatus">{{selectContent}}></text> </view> selectStatus() { var that this; my.optionsSel…

CMD进入到某目录

进入到D盘abc目录&#xff0c;进入其他目录直接替换d:\abc即可 cd /d d:\abc

执行npm install gdt-jsapi

在政务钉钉开发者工具中&#xff0c;要求在项目的根目录执行npm install gdt-jsapi&#xff0c;首先我们得先去下载 | Node.js然后进行安装。安装好以后&#xff0c;我们通过CMD命令进入到项目的根目录(CSDN)&#xff0c;然后在CMD中执行npm install gdt-jsapi&#xff0c;中途…

判断字符串以某字符结尾

String str"ahsghjgd" boolean resultstr.endsWith("abc");

获取当前时间

SimpleDateFormat formatter new SimpleDateFormat("yyyy-MM-dd qqq HH:mm:ss"); Date date new Date(System.currentTimeMillis()); String timeformatter.format(date); System.out.println("当前时间"formatter.format(date));

java 取绝对值

使用Math.abs(x) Integer a -1; double d -2; float f -3; Math.abs(a)

android.view.WindowManager$BadTokenException: Unable to add window -- token null for displayid = 0

在设置dialog的时候出现 android.view.WindowManager$BadTokenException: Unable to add window -- token null for displayid 0 is not valid; is your activity running?这个错误&#xff0c;代码如下所示 ProgressDialog progressDialog DialogUtil.showProgressDialog…

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.意思是已安装的构建工具修订31.0.0已损坏。使用SDK管理器删除并重新安装。 compileSdkVersion 30 buildToolsVersion "31.0.0" targetSdkVersion 30 我们可以…