-
May 16th, 2021, 02:43 AM
#1
Thread Starter
PowerPoster
[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.
-
May 16th, 2021, 03:09 AM
#2
Re: name of day listview column
Originally Posted by luca90
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
-
May 16th, 2021, 05:51 AM
#3
Thread Starter
PowerPoster
Re: name of day listview column
Originally Posted by schmidt
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|