Date Formats for SetProperty

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
bandorganman
Posts: 64
Joined: Tue Mar 03, 2020 5:23 pm

Date Formats for SetProperty

Post by bandorganman »

How do I enter a date? Standard date formats do not seem to work.

Code: Select all

if (hb1.Hud106 > 0)
                        {
                            IOrderItem cityTax = taxes.Cast<IOrderItem>()
                            .Where(t => t.GetType().Name == "CityTax")
                            .FirstOrDefault();
                            //cityTax.SetProperty("TaxAmountComputeMethod", "2");
                            IOrderItem btx = (IOrderItem)cityTax.GetProperty("BuyerTax");
                            btx.SetProperty("Amount", hb1.Hud106);
                            btx.SetProperty("PeriodFrom", ????????); // Please provide date format
                            
                        }
BobRichards
Posts: 1150
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Date Formats for SetProperty

Post by BobRichards »

Code: Select all

btx.SetProperty("PeriodFrom", Date.Parse("11/24/2021"))
Bob Richards, Senior Software Developer, SoftPro
bandorganman
Posts: 64
Joined: Tue Mar 03, 2020 5:23 pm

Re: Date Formats for SetProperty

Post by bandorganman »

Thank you.
Post Reply