[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2143
  • Last Modified:

Powershell Windows.Forms.DateTimePicker - Date only?

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
garryshape
Asked:
garryshape
1 Solution
 
SubsunCommented:
You could format the value. For example..
$DatePicker.value.ToString("MM/dd/yyyy")
0
 
garryshapeAuthor Commented:
sweet it works thanks so much
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now