Home > Software engineering >  How to remove DTPicker1. Value automatically with last week?
How to remove DTPicker1. Value automatically with last week?

Time:11-13

Use DTPicker1 controls:
Set the
DTPicker1. Format=dtpShortDate
DTPicker1. CustomFormat="yyyy - mm - dd"

Display year, month, day, always follow week how to cancel? (in some computer) will not display

CodePudding user response:

Has it got anything to do with your computer control panel in the locale of the short date set, as shown in figure:

CodePudding user response:

Write well, code is as follows:
 
Option Explicit

Private Sub Command1_Click ()
'shown here is the date of the format for the specified format, and pay attention to the format function customformat attributes in case there is a difference between;
MsgBox Format (DTPicker1. Value, "yyyy - mm - dd")
End Sub

Private Sub Form_Load ()
At the bottom of the 'is displayed in the control of format;
DTPicker1. CustomFormat="yyyy - MM - dd"
DTPicker1.=dtpCustom 'Format using a custom Format;
End Sub

Download address:
Link: https://pan.baidu.com/s/12JiM-eM7_-h4SklsPY1aDg
The extracted code: fn1d

Run the example:

CodePudding user response:

The design, in the properties window Settings:
CustomFormat input: yyyy/M/d
The Format property is set to 3 that,


Note: the input CustomFormat letters, capitalization must be the same with me,
  • Related