快,请高手帮忙,急。。。。。。。。。。

jiangrod 2004-08-05 10:48:18
我现在要得到20040805这样的日期格式,但如何得到呢?使用response.write (date)输出的2004-8-5的格式,如何得到20040805的格式呢?
...全文
81 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
bolm 2004-08-05
  • 打赏
  • 举报
回复
我以前用的是 duxingxue(3321) 的方法,比较简单,用来生成定单号比较实用!
duxingxue 2004-08-05
  • 打赏
  • 举报
回复
忘了加零,:)
datestr=date
findate=year(datestr)&right("0"&month(datestr),2)&right("0"&day(datestr),2)
response.write(replace(findate,"-",""))
duxingxue 2004-08-05
  • 打赏
  • 举报
回复
response.write(replace(date,"-",""))
  • 打赏
  • 举报
回复
很多这问题呢
thedate=cdate("2004-8-5")
fdate=year(thedate)&right("0"&month(thedate),2)&right("0"&day(thedate),2)
jiangrod 2004-08-05
  • 打赏
  • 举报
回复
谢谢,结贴,给上面的仁兄加分
xiaobird1 2004-08-05
  • 打赏
  • 举报
回复
strTemp = Split( date(), "-" )
strNewDate = strTemp(0)
If Len( strTemp(1) ) = 1 Then
strNewDate = strNewDate & "0" & strTemp(1)
End If
If Len( strTemp(2) ) = 1 Then
strNewDate = strNewDate & "0" & strTemp(2)
End If

Response.write strNewDate
顺子 2004-08-05
  • 打赏
  • 举报
回复
ddate=cdate(date1)
sdate1=year(ddate)&"-"& month(ddate)&"-"&day(ddate)

28,409

社区成员

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

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