Monday, March 19, 2012

DateTime Package variable.. only Date no Time?

I have a package variable that is a datetime... how am I able to set the time of that variable? In visual studio on the variables screen if I click on value it brings up a calendar control - I can't seem to edit the time portion of the variable.

When I first click open the variables window it will say 9/1/2006 12:00:00 AM - but as soon as I click on the value box the 12:00:00 AM part will disappear and I can't edit it. I've tried on someone elses PC as well to make sure there isn't something wrong with my visual studio

Ideas?

You can edit the time in the Properties window: select the variable in Variables window and then click the Properties window, and type the time in Value property.

I'm not sure why the Variables window behaves differently, I'll file a bug report to consider.

|||

Press F4 to show the properties panel; then go to value and type in the date and time you want.

Rafael Salas

|||

Awesome thanks... I figured there had to be SOME way to set it. I've been creating packages every day at work for months now and never needed to set a time portion till today.

Actually I didn't even know there were properties of variables (now that I am in there I see you can make variables expressions... wow I wish I knew that earlier - I've been using scripts to set variables that I wanted to be expressions! - so I get a bonus I didn't know about with this question.)

No comments:

Post a Comment