真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb點(diǎn)虐 求第幾周 vb顯示星期幾

vb 計(jì)算某天是一年中的第幾周

非常簡(jiǎn)單,沒(méi)有那么復(fù)雜吧?

為麥蓋提等地區(qū)用戶提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及麥蓋提網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為成都做網(wǎng)站、網(wǎng)站制作、麥蓋提網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專(zhuān)業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!

If?Text1.Text?=?""?Then

MsgBox?"",?16,?""???'以下對(duì)話框的提示內(nèi)容自己填寫(xiě)吧!

Exit?Sub

End?If

If?Text2.Text?=?""?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

If?Text3.Text?=?""?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

If?IsNumeric(Text1.Text)?=?False?Or?Val(Text1.Text)??9999?Or?Val(Text1.Text)??1000?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

If?IsNumeric(Text2.Text)?=?False?Or?Val(Text1.Text)??12?Or?Val(Text1.Text)??1?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

If?IsNumeric(Text3.Text)?=?False?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

If?Val(Text2.Text)?=?1?Or?Val(Text2.Text)?=?3?Or?Val(Text2.Text)?=?5?Or?Val(Text2.Text)?=?7?Or?Val(Text2.Text)?=?8?Or?Val(Text2.Text)?=?10?Or?Val(Text2.Text)?=?12?Then

If?Val(Text3.Text)??31?Or?Val(Text3.Text)??1?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

ElseIf?Val(Text2.Text)?=?4?Or?Val(Text2.Text)?=?6?Or?Val(Text2.Text)?=?9?Or?Val(Text2.Text)?=?11?Then

If?Val(Text3.Text)??30?Or?Val(Text3.Text)??1?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

ElseIf?Val(Text2.Text)?=?2?Then

If?Val(Text1.Text)?Mod?4?=?0?Then

If?Val(Text3.Text)??29?Or?Val(Text3.Text)??1?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

Else

If?Val(Text3.Text)??28?Or?Val(Text3.Text)??1?Then

MsgBox?"",?16,?""

Exit?Sub

End?If

End?If

End?If

Dim?year1?As?String,?month1?As?String,?day?As?String,?Weekday1?As?Integer,?Weekday2?As?String

year1?=?Text1.Text

month1?=?Text2.Text

day1?=?Text3.Text

Weekday1?=?Weekday(CDate(year1??"-"??month1??"-"??day1))

Select?Case?Weekday1

Case?0:?Weekday2?=?"星期六"

Case?1:?Weekday2?=?"星期日"

Case?2:?Weekday2?=?"星期一"

Case?3:?Weekday2?=?"星期二"

Case?4:?Weekday2?=?"星期三"

Case?5:?Weekday2?=?"星期四"

Case?6:?Weekday2?=?"星期五"

End?Select

VB計(jì)算一年中某一天在這一年中是第幾周

Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click Dim date1 As Date = txtDate.Text Dim date0 = Year(date1) "/01/01" Dim wk = DateDiff("ww", date0, date1, Microsoft.VisualBasic.FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFullWeek) If (wk = 0) Then //判斷周數(shù)是否為0,為0則為去年最后一周 Dim date2 = Year(date1) - 1 Dim date3 = date2 "/12/31" Dim date4 = date2 "/01/01" wk = DateDiff("ww", date4, date3, Microsoft.VisualBasic.FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFullWeek) End If lblShow.Text = txtDate.Text "是" Year(date1) "第" wk "周!"End Sub

vb點(diǎn)虐 中怎么根據(jù)日期算出是周幾呢?

Public?Function?IsRunnian(ByVal?n?As?Integer)?As?Boolean

Dim?res?As?Boolean

res?=?False

If?n?Mod?400?=?0?Then

res?=?True

End?If

If?(n?Mod?100??0)?And?(n?Mod?4?=?0)?Then

res?=?True

End?If

IsRunnian?=?res

End?Function

Public?Function?Fc(ByVal?td?As?Date)?As?Byte

Dim?y?As?Integer

Dim?m?As?Integer

Dim?d?As?Integer

Dim?yc?As?Integer

Dim?mc?As?Integer

Dim?dc?As?Integer

y?=?Year(td)

m?=?Month(td)

d?=?Day(td)

dc?=?d

If?IsRunnian(y)?Then

mc?=?Val(Mid("512503514624",?m,?1))

Else

mc?=?Val(Mid("622503514624",?m,?1))

End?If

yc?=?((y?Mod?100)?\?4?+?(y?Mod?100))?Mod?7

Fc?=?(yc?+?mc?+?dc)?Mod?7

End?Function


文章題目:vb點(diǎn)虐 求第幾周 vb顯示星期幾
文章起源:http://weahome.cn/article/ddshpop.html

其他資訊

在線咨詢(xún)

微信咨詢(xún)

電話咨詢(xún)

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部