Aug 9th, 2010, 07:45 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] DTpicker only year and month
Hi
Is there some way to set dtpicker for to show onlye year and month ?
Some Format ?
Tia
Aug 9th, 2010, 07:50 AM
#2
Aug 9th, 2010, 07:54 AM
#3
Re: DTpicker only year and month
And to follow up with Sid's reply, the dtpicker's custom format is case sensitive (i.e., M and m mean 2 different things). Here is a listing of the formats
Aug 9th, 2010, 07:56 AM
#4
Re: DTpicker only year and month
Nice one Keith.. I missed that... was typing too fast I guess
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Aug 9th, 2010, 08:03 AM
#5
Thread Starter
Fanatic Member
Re: DTpicker only year and month
Thank you all
more I put in my code
Code:
dtpDe.CustomFormat = "MM/yyyy"
But show all day of month
Aug 9th, 2010, 08:07 AM
#6
Re: DTpicker only year and month
You didn't understand post 2
Try this...
Code:
Private Sub Form_Load()
dtpDe.Format = dtpCustom
dtpDe.CustomFormat = "MM/YYYY"
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Aug 9th, 2010, 08:20 AM
#7
Thread Starter
Fanatic Member
Re: DTpicker only year and month
I already tried like below
Code:
Case "CRONOGRAMA"
fraFiltrosA = "FILTROS PARA GERAÇÃO DO CRONOGRAMA"
fraFiltrosA.ForeColor = &H80FF&
fraFiltrosA.Enabled = True
fraFiltrosB.Enabled = True
tbRelatorio.Buttons("TABELADINAMICA").Value = tbrUnpressed
tbRelatorio.Buttons("GRUPOSEITENS").Value = tbrUnpressed
tbRelatorio.Buttons("GERAR").Enabled = True
dtpDe.Format = dtpCustom
dtpDe.CustomFormat = "MM/yyyy"
Please see attachment , figura_003.jpg
Attached Images
Aug 9th, 2010, 08:29 AM
#8
Re: DTpicker only year and month
So What is your question?
As far as I can see it has formatted as per your requirement? It does show "08/2010" Right?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Aug 9th, 2010, 08:34 AM
#9
Thread Starter
Fanatic Member
Re: DTpicker only year and month
yes, but I do not wnat to show days of calendar
Aug 9th, 2010, 08:37 AM
#10
Re: DTpicker only year and month
Originally Posted by
mutley
yes, but I do not wnat to show days of calendar
Well to turn off the GUI calendar, change the UpDown property to True. Otherwise, you may want to consider doing away with the dtpicker & using 2 combo boxes or something similar.
Aug 9th, 2010, 08:37 AM
#11
Addicted Member
Re: DTpicker only year and month
Hi,
Even if you CustomFormat, The dropdown shows complete calender (with days)
So, why not add a Combobox, and populate it..? something like this :
vb Code:
Private Sub FillMonths(ByVal MFStart As Date, ByVal MFEnd As Date)
Dim Tdate As Date
cmbMonth.Clear
Tdate = MFStart
Do
cmbMonth.AddItem Format(Tdate, "mmm-yyyy")
Tdate = DateAdd("m", 1, Tdate)
Loop Until Tdate > MFEnd
End Sub
Regards
Veena
Aug 9th, 2010, 08:41 AM
#12
Re: DTpicker only year and month
Oh!
Yeah in that case, DTP is a wrong choice...
Create a Combo as Keith or Veena suggested.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear :
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Aug 10th, 2010, 06:37 AM
#13
Thread Starter
Fanatic Member
Re: DTpicker only year and month
Very Good, I will to use Combobox
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