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

推荐订阅源

W
WeLiveSecurity
T
Tenable Blog
Project Zero
Project Zero
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
S
Schneier on Security
Scott Helme
Scott Helme
S
Securelist
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
IT之家
IT之家
V
V2EX
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
K
Kaspersky official blog
博客园_首页
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Spread Privacy
Spread Privacy
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
The Register - Security
The Register - Security
有赞技术团队
有赞技术团队
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
AWS News Blog
AWS News Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
The Cloudflare Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost

博客园 - 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