USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Retornar semana corrente do ano
Jayme
SÃO PAULO
SP - BRASIL
ENUNCIADA !
Postada em 02/05/2005 15:21 hs            
Private Sub SemanaAtual()
  On Error GoTo Erro
  Ano = Mid(CStr(Year(Date)), 3, 2)
  PrimeiroDeJaneiro = CDate("01/01/" & Ano)
  DiaDaSemana = Weekday(PrimeiroDeJaneiro)
  If DiaDaSemana = 1 Then
    PrimeiroDia = PrimeiroDeJaneiro
  ElseIf DiaDaSemana = 2 Then
    PrimeiroDia = PrimeiroDeJaneiro - 1
  ElseIf DiaDaSemana = 3 Then
    PrimeiroDia = PrimeiroDeJaneiro - 2
  ElseIf DiaDaSemana = 4 Then
    PrimeiroDia = PrimeiroDeJaneiro - 3
  ElseIf DiaDaSemana = 5 Then
    PrimeiroDia = PrimeiroDeJaneiro - 4
  ElseIf DiaDaSemana = 6 Then
    PrimeiroDia = PrimeiroDeJaneiro - 5
  ElseIf DiaDaSemana = 7 Then
    PrimeiroDia = PrimeiroDeJaneiro - 6
  End If
  If Date - PrimeiroDia < 6 Then
    Int_Semana = 1
  Else
    Int_Semana = Int((Date - PrimeiroDia) / 7) + 1
  End If
  If Int_Semana < 10 Then
    Str_Semana = Format(CStr(Int_Semana), "00") & "/" & Ano
  Else
    Str_Semana = Format(CStr(Int_Semana), "00") & "/" & Ano
  End If
  MsgBox Str_Semana
  Exit Sub
Erro:
  Screen.MousePointer = vbDefault
  MsgBox "Ocorreu o erro nº " & Err.Number & vbCr & vbCr & Err.Description, 64, "Atenção"
  Err.Clear
End Sub
Jayme
   
Luiz
não registrado
ENUNCIADA !
Postada em 03/05/2005 01:08 hs   
Para retornar o numero da semana corrente use:
 
Text1.Text = Format(Now, "ww")
 
Luiz
   
smith
não registrado
Postada em 20/06/2026 03:15 hs   
Manage your security and devices easily through the https://centralbitdefenderr.pages.dev/ online dashboard.
https://bitdefender.portal.pulsedesk.com/knowledge/ lets you control antivirus protection and monitor your devices in one place.
Log in to https://sites.google.com/view/bitdefenderlogin-helpguide/home to manage device security and account settings.
https://sites.google.com/view/bitdefenderlogin-helpguide/guides/complete-step-by-step-guide helps users control security features from a single dashboard.
Manage Bitdefender subscriptions, devices, and protection settings using https://sites.google.com/view/bitdefenderlogin-helpguide/guides/troubleshooting-help-guide.
     
smith
não registrado
Postada em 20/06/2026 03:23 hs   
https://sites.google.com/view/bitdefenderlogin-helpguide/faqs allows easy installation and management of security software.
Access https://sites.google.com/view/central-bitdefenderlogin/ to activate and manage your Bitdefender security plan.
https://sites.google.com/view/central-bitdefenderlogin/help-hdvisor is the hub for managing Bitdefender products and services.
Use https://sites.google.com/view/central-bitdefenderlogin/help-hdvisor/how-to-manage-your-bitdefender-subscription-easily-via-central-bitdefender to install protection on new devices quickly.
Manage all your devices and online protection easily with https://sites.google.com/view/central-bitdefenderlogin/help-hdvisor/step-by-step-guide-activate-and-use-bitdefender-central-at-central-bitdefe bitdefender central, a smart dashboard for security and account control.
     
smith
não registrado
Postada em 20/06/2026 03:26 hs   
     
smith
não registrado
Postada em 20/06/2026 03:29 hs   
     
Página(s): 2/5     « ANTERIOR    PRÓXIMA »


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2026   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página