month format in visual basic 6

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 47
Reputation: locsin is an unknown quantity at this point 
Solved Threads: 0
locsin locsin is offline Offline
Light Poster

month format in visual basic 6

 
0
  #1
Dec 4th, 2007
greetings!

anybody know how to convert the month value into word format


for example date = 12/2007
month is december

how to convert this 12 into "december "

is there any command to get the month value into string or word format...or i make may own...

thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: month format in visual basic 6

 
0
  #2
Dec 4th, 2007
you can change date format :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Ex : Format(Date, "dddd MMMM dd,yyyy")
every days name and month name will be long type

or you can make procedure to convert :
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Month_Convertion()
  2. Dim bulan As String
  3.  
  4. bulan = Month(Date)
  5. Select Case bulan
  6. Case 1
  7. bulan = "Januari"
  8. Case 2
  9. bulan = "Februari"
  10. Case 3
  11. bulan = "Maret"
  12. Case 4
  13. bulan = "April"
  14. Case 5
  15. bulan = "Mei"
  16. Case 6
  17. bulan = "Juni"
  18. Case 7
  19. bulan = "Juli"
  20. Case 8
  21. bulan = "Agustus"
  22. Case 9
  23. bulan = "September"
  24. Case 10
  25. bulan = "Oktober"
  26. Case 11
  27. bulan = "November"
  28. Case 12
  29. bulan = "Desember"
  30. End Select
  31.  
  32. bln = bulan
  33. End Sub

to call this procedure:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Month_Convertion
  2. lblMonth.Caption = bln

Jery
Best Regards
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC