Results 1 to 3 of 3

Thread: [RESOLVED] name of day listview column

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Resolved [RESOLVED] name of day listview column

    i hava a listview with 31 column. (start from column 2)

    i need to rename, by day, each column based year and month


    for example 02/2020

    varyear=2020
    varmonth=2

    col2 col3 col4 ... col29 col30 col31
    1-lunedi, 2-martedi...28-mercoledi, 1-lunedi, 2-martedi 3-mercoledi

    naturally the last 3 day are refered to march 2020
    Last edited by luca90; May 16th, 2021 at 02:52 AM.

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: name of day listview column

    Quote Originally Posted by luca90 View Post
    i hava a listview with 31 column. (start from column 2)

    i need to rename, by day, each column based year and month

    col2 col3 col4 ... col29 col30 col31
    1-lunedi, 2-martedi...28-mercoledi, 1-lunedi, 2-martedi 3-mercoledi

    naturally the last 3 day are refered to march 2020
    The DateSerial-Function is ideal for stuff like that (when crossing month-boundaries with a loop variable):
    Code:
    Dim i
    For i = 1 To 31
      Debug.Print Format(DateSerial(2020, 2, i), "d-dddd")
    Next
    As for your formatting, just play around with the amount of "d"'s in the Format-String.

    Olaf

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Re: name of day listview column

    Quote Originally Posted by schmidt View Post
    the dateserial-function is ideal for stuff like that (when crossing month-boundaries with a loop variable):
    Code:
    dim i
    for i = 1 to 31
      debug.print format(dateserial(2020, 2, i), "d-dddd")
    next
    as for your formatting, just play around with the amount of "d"'s in the format-string.

    Olaf
    tks bro!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width