怎样把2004-2-12 12:30:18 这样的格式转换为20040212123018

yx360 2004-11-27 02:35:07
rt,转换为字符串型
...全文
102 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
yx360 2004-11-27
  • 打赏
  • 举报
回复
to hedongyang(笑笑) and xiaozx(老德)
你们的方法不能把1位的月份转换为2位的,不过还是要谢谢你们
waiber 2004-11-27
  • 打赏
  • 举报
回复
'晕 忘补0,加上!

function ConvDateTimeAll(StrDateTimeAll)
dim strYear,strMonth,strDay
dim strHour,strMin,strSec

strYear = Year(StrDateTimeAll)
strMonth = Month(StrDateTimeAll)
if len(strMonth)=1 then
strMonth="0" & strMonth
end if
strDay = day(StrDateTimeAll)
if len(strDay)=1 then
strDay ="0" & strDay
end if
strHour = hour(StrDateTimeAll)
if len(strHour)=1 then
strHour ="0" & strHour
end if
strMin = Minute(StrDateTimeAll)
if len(strMin)=1 then
strMin="0" & strMin
end if
strSec = Second(StrDateTimeAll)
if len(strSec)=1 then
strSec="0" & strSec
end if

ConvDateTimeAll = strYear&strMonth&strDay&strHour&strMin&strSec
end function

Response.Write(ConvDateTimeAll(Now()))
waiber 2004-11-27
  • 打赏
  • 举报
回复
function ConvDateTimeAll(StrDateTimeAll)
dim strYear,strMonth,strDay
dim strHour,strMin,strSec

strYear = Year(StrDateTimeAll)
strMonth = Month(StrDateTimeAll)
strDay = day(StrDateTimeAll)
strHour = hour(StrDateTimeAll)
strMin = Minute(StrDateTimeAll)
strSec = Second(StrDateTimeAll)

ConvDateTimeAll = strYear&strMonth&strDay&strHour&strMin&strSec
end function

Response.Write(ConvDateTimeAll(Now()))
Camelot 2004-11-27
  • 打赏
  • 举报
回复
Function timecode(tstr)
timecode=Year(tstr)
if Month(tstr)<10 then timecode=timecode &"0"
timecode=timecode & Month(tstr)
if Day(tstr)<10 then timecode=timecode &"0"
timecode=timecode & Day(tstr)
if Hour(tstr)< 10 then timecode=timecode &"0"
timecode=timecode & Hour(tstr)
if Minute(tstr)<10 then timecode=timecode &"0"
timecode=timecode & Minute(tstr)
if Second(tstr)<10 then timecode=timecode &"0"
timecode=timecode & Second(tstr)
end Function


用上面这个函数,
如Response.Write(timecode(Now()))





┏━━━.:可爱的分割线:.━━━━━━━━━━━━━━━━
┃                                
┃在线的RSS订阅系统(Blog、新闻、技术):http://www.gbmad.net/rss/
┃无论你在哪,只要能上网就能订阅查看你喜欢的聚合         
┃                                
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━
phckt 2004-11-27
  • 打赏
  • 举报
回复
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
xiaozx 2004-11-27
  • 打赏
  • 举报
回复
aa=replace(aa," ","")
aa=replace(aa,"-","")
aa=replace(aa,":","")
hedongyang 2004-11-27
  • 打赏
  • 举报
回复
Dim dd,dd1
dd=Now()

dd1=Replace(dd,"-","")
dd1=Replace(dd1," ","")
dd1=Replace(dd1,":","")

Response.Write(dd1)
yx360 2004-11-27
  • 打赏
  • 举报
回复
up
内容概要:本文详细介绍了Anaconda的下载、安装与配置方法(2025最新版)。Anaconda是一个开源的Python/R数据科学集成开发平台,预装了1500多个科学计算库,并提供conda包管理和环境管理功能。文章首先列出了系统要求,接着分别讲述了适用于不同操作系统的下载方式,包括官方下载和国内镜像下载。然后,具体讲解了Windows、macOS和Linux三种操作系统的安装步骤,以及环境变量的手动配置方法。此外,还提供了验证安装是否成功的命令和配置国内镜像源的方法,以提高下载速度。最后,列出了一些常用conda命令和常见问题的解决方案。 适合人群:从事数据科学、机器学习领域的研究人员和开发者,特别是需要频繁使用Python科学计算库的用户。 使用场景及目标:①帮助用户快速搭建Python开发环境,尤其是需要多个Python版本共存或隔离环境的情况下;②解决因网络原因导致的下载速度慢的问题;③提供详细的安装指南,确保安装过程顺利进行;④指导用户正确配置环境变量,避免常见的安装后无法使用的错误。 阅读建议:由于Anaconda涉及多平台安装和配置,建议读者根据自己的操作系统选择相应的章节重点阅读,并严格按照步骤操作。对于初次使用者,建议先从简单的安装入手,再逐步学习环境管理和包管理的相关命令。

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧