:?: How do I change the input and display of the dtpicker control to "dd/mm/yy" format. Also how do I store it in an MS-Access database in the same format (ie. dd/mm/yy ) . ... need help urgently!
Regards,
Swati
:?: How do I change the input and display of the dtpicker control to "dd/mm/yy" format. Also how do I store it in an MS-Access database in the same format (ie. dd/mm/yy ) . ... need help urgently!
Regards,
Swati
For dtPicker you can use the dtPicker.Format to set it to whatever you want, including dtpShortDate and dtpCustom. If you use custom then dtPicker.CustomFormat can be set to any format (including "dd/mm/yy") however this will then ignore the users regional settings. Hence short date is probably the best choice for what you want.
As for storing it in Access, always store it as a date and then when you want to display it do the formatting. You should never store dates as strings in the database. Set the date format either in your SELECT statement or at the point where the data is displayed to the user.
Regards
D
help me with the dtpicker code
please help me with the code that dislays the functionality of the dtpicker
Here you Go...
1:- Firs Place one DTPicker1 on Form.
2:- Go To DTPicker1 Properties and Set Format = 3-dtpCoustom.
3:- Private Sub Form_Load()
DTPicker1.CoustomFormate = "dd-MM-yy"
End Sub
4:- Private Sub Command1_Click()
Dim db As Database
db.Execute ("INSERT InTo Tabel1(iDate) Values(' " & DTPicker1.Value & " ' ")
End Sub
Hope you clear..
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.