惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

博客园 - Lee Vane

无法通过“控制面板”卸载 Office 2003、Office 2007 或 Office 2010 套件的情况下,如何才能将其卸载? 量子恒道统计-淘宝添加步骤 朋友写的,我觉得比较好,批量生产HTML中使用的 使用CSS设计了一个导航栏(仿康盛创想) 文章内容分页 可点击的下拉菜单 ASP多行多列显示代码- 5行 Formfieldhints.--表单提示效果 项目分享---google calendar.(日历,java版). asp根据出生时间判断生肖 用 JavaScript 实现网页图片等比例缩放 ASP数据库操作类 新闻标题太长加省略号和对内容太长分页 检查组件是否已经安装,用Jmail组件发送邮件 ASP函数,实现多个功能的弹出对话框 全选并改变TR颜色 选择文字就能选择复选框 简洁的TAB 阿里妈妈的商城分类效果一
格式化日期
Lee Vane · 2008-09-26 · via 博客园 - Lee Vane

'================================================
 '函数名:FormatDate
 '作 用:格式化日期
 '参 数:DateAndTime ----原日期和时间
 ' para ----日期格式
 ' 用法:再ASP中:=FormatDate(rs("pubdate"),6)  ,前面的6表示选择要用下面的哪种格式
 '返回值:格式化后的日期
 '================================================
 Function FormatDate(DateAndTime, para)
   On Error Resume Next
   Dim y, m, d, h, mi, s, strDateTime
   FormatDate = DateAndTime
   If Not IsNumeric(para) Then Exit Function
   If Not IsDate(DateAndTime) Then Exit Function
   yy = CStr(Year(DateAndTime))
   y = Mid(CStr(Year(DateAndTime)),3)
   m = CStr(Month(DateAndTime))
   If Len(m) = 1 Then m = "0" & m
   d = CStr(Day(DateAndTime))
   If Len(d) = 1 Then d = "0" & d
   h = CStr(Hour(DateAndTime))
   If Len(h) = 1 Then h = "0" & h
   mi = CStr(Minute(DateAndTime))
   If Len(mi) = 1 Then mi = "0" & mi
   s = CStr(Second(DateAndTime))
   If Len(s) = 1 Then s = "0" & s
 
   Select Case para
   Case "1"
   strDateTime = y & "-" & m & "-" & d & " " & h & ":" & mi & ":" & s
   Case "2"
   strDateTime = yy & m & d & h & mi & s
   '返回12位 直到秒 的时间字符串
   Case "3"
   strDateTime = yy & m & d & h & mi  
   '返回12位 直到分 的时间字符串
   Case "4"
   strDateTime = yy & "年" & m & "月" & d & "日"
   Case "5"
   strDateTime = m & "-" & d
   Case "6"
   strDateTime = m & "/" & d
   Case "7"
   strDateTime = m & "月" & d & "日"
   Case "8"
   strDateTime = y & "年" & m & "月"
   Case "9"
   strDateTime = y & "-" & m
   Case "10"
   strDateTime = y & "/" & m
   Case "11"
   strDateTime = y & "-" & m & "-" & d
   Case "12"
   strDateTime = y & "/" & m & "/" & d
   '下面是年四位数格式
   Case "13"
   strDateTime = yy & "-" & m & "-" & d & " " & h & ":" & mi & ":" & s
   Case "14"
   strDateTime = yy & "-" & m & "-" & d
   Case Else
   strDateTime = DateAndTime
   End Select
   FormatDate = strDateTime
 End Function