Solved

Powershell Windows.Forms.DateTimePicker - Date only?

Posted on 2014-11-20
2
1,560 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A brief introduction to what I consider to be the best editor for PowerShell.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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