我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何在PHP中将字符串转换为日期格式? [重复]

This question already has an answer here:

  • Convert one date format into another in PHP 15 answers

I am trying to convert a date in string format to date format, here is the example

1. 15Oct15 to 2015-10-15
2. 151015  to 2015-10-15
3. 15102015 to 2015-10-15

Please help me to find a solution.

</div>

You can convert 1. 15Oct15 to 2015-10-15 using date('Y-m-d', strtotime("15Oct15"))

Not sure of other 2

近期文章

  • query()到非对象
  • android面向对象中不能重用方法
  • 使用PHP编写文件
  • PHP数组多个键[关闭]
  • SQL语法中有什么错误
  • PHP表单不提交[关闭]
  • 将c ++函数转换为PHP?
  • 我不知道我的HTML和PHP代码有什么问题。它给出错误:查询为空
  • Php代码用于加密客户端输入数据并在服务器端解密
  • 如何将当前位置映射到餐厅查找器应用程序android中的餐馆
  • 如何选择等于值的名称数量并保存找到的变量中的搜索次数[关闭]
  • 使用php将html数据发送到打印机
  • 无法理解preg_match模式
  • 将foreach循环包装到div中不起作用[重复]
  • 发送联系表单时出现Mysql错误[关闭]
  • 坚持PHP程序。 需要一些想法
  • 如何使用php读取变量地址的整个页面
  • 如何检查网址页面中是否存在参数?
  • 我怎样才能在php中回应这个系列0110011001100110
  • js提交不起作用不发送表格数据到PHP

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华