Solved

Powershell Windows.Forms.DateTimePicker - Date only?

Posted on 2014-11-20
2
1,360 Views
Last Modified: 2014-11-20
I am working with a Windows.Forms.DateTimePicker in a Powershell GUI.

I can pick the date and return the value, but the problem is it is returning the time as well.
How can I get it to just be the value of the date (like "11/20/2014" instead of "11/21/2014 11:45:18 AM"?
0
Comment
Question by:garryshape
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40455840
You could format the value. For example..
$DatePicker.value.ToString("MM/dd/yyyy")
0
 

Author Closing Comment

by:garryshape
ID: 40455906
sweet it works thanks so much
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now