六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

在ASP.NET中處理 datetime 的一些通用函數(vb)

[摘要]'Uses the Timespan method to subtract a certain number of daysFunction Date1()Dim NewTime as Da...
'Uses the Timespan method to subtract a certain number of days
Function Date1()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
NewTime = NewTime.Format("MM/dd/yyyy", DateTimeFormatInfo)
response.write(NewTime)
End Function

'Uses the AddDays method to subtract X number of days
Public Function Date2()
Dim NewTime as DateTime
NewTime = DateTime.Now.AddDays(-7)
Dim s as string = NewTime
return s
End Function

'Thanks to Paul Czywczynski for this idea
'This probably (In My opinion) Offers the most flexibility found so far
'Change where the MM/dd/yyyy to whatever
'response.write(System.String.Format("{0:d}",NewTime))
'would return just the name of the Day
Function Date3()
Dim NewTime as DateTime = now.addDays(-7)
response.write(System.String.Format("{0:MM/dd/yyyy}",NewTime))
End Function


Function Date4()
Dim NewTime as DateTime
NewTime = now.addDays(-7)
return NewTime.ToString()
End Function

'Uses the toLongTimeString method
Public Function Date5()
Dim NewTime as DateTime
NewTime = Now()
return newtime.toLongTimeString()
End Function

'Uses the toShortTimeString method
Public Function Date6()
Dim NewTime as DateTime
NewTime = Now()
return newtime.toShortTimeString()
End Function

'Uses the toLongDateString method
Public Function Date7()
Dim NewTime as DateTime
NewTime = Now()
return newtime.toLongDateString()
End Function

'Uses the toShortDateString method
Public Function Date8()
Dim NewTime as DateTime
NewTime = Now()
return newtime.toShortDatestring()
End Function

'Uses FormatDateTime function General format
Function Date9()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
return formatdatetime(NewTime, 0)
End Function

'Uses FormatDateTime function LongDate format
Function Date10()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
return formatdatetime(NewTime, 1)
End Function

'Uses FormatDateTime function ShortDate format
Function Date11()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
return formatdatetime(NewTime, 2)
End Function

'Uses FormatDateTime function LongTime format
Function Date12()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
return formatdatetime(NewTime, 3)
End Function

'Uses FormatDateTime function ShortTime format
Function Date13()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract( New TimeSpan(7, 0, 0, 0) )
return formatdatetime(NewTime, 4)
End Function

'Bring Back just the name of the Day
Function Date14()
Dim NewTime as DateTime = now.addDays(-7)
dim s as string
s = (System.String.Format("{0:dddd}",NewTime))
Return s
End Function

'Returns the Integer of what day of week
Function Date15()
Dim MyDate as DateTime
Dim MyWeekDay as Integer
MyDate = Now.AddDays(-5)
MyWeekDay = Weekday(MyDate)
return MyWeekDay
End Function

'Returns the Month Integer
Function Date16()
Dim MyDate as DateTime
Dim MyMonth as Integer
MyDate = Now.AddDays(-5)
MyMonth = Month(MyDate)
return MyMonth
End Function

'Returns just a formatted string
'This method provides just formatting but
'Very flexible with not a lot of code
Function Date17()
Dim MyDate as String
MyDate = Format(Now(), "yyyy")
return MyDate
End Function
</script>





主站蜘蛛池模板: 啪啪色视频 | 色综合久久精品中文字幕 | 亚洲第一区精品日韩在线播放 | 日韩伦理在线视频 | 四虎地址8848 | 日韩资源 | 欧美在线a级高清 | 亚洲精品免费视频 | 亚洲国产中文在线 | 五月婷婷六月丁香激情 | 日韩人成免费网站大片 | 日本综合久久 | 色五夜婷婷 | 亚洲区在线播放 | 欧美一级黄视频 | 天天操91| 日日日干 | 欧美怡红院免费全视频 | 日本三级在线播放线观看2021 | 日韩毛片免费观看 | 色先锋资源网 | 四虎成人在线 | 亚洲一区二区三区精品影院 | 日本免费网站视频www区 | 亚欧成人中文字幕一区 | 日韩精品亚洲一级在线观看 | 日韩黄色影视 | 天天躁狠狠躁狠狠躁夜夜躁 | 天天射天天舔 | 亚洲男人的天堂久久无 | 婷婷亚洲天堂 | 新一级毛片国语版 | 欧美一区二区在线观看 | 欧美综合中文字幕久久 | 青娱乐中文字幕 | 日韩不卡一二三区 | 天天操天天摸天天曰天天干天天弄天天干 | 欧美亚洲国产精品久久久久 | 亚洲看逼| 亚洲精品乱码久久久久久麻豆 | 手机看片久久国产免费不卡 |