Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 143529

Need convert DateTime to UTCDatetime

$
0
0

Hi All,

I have a question, I need a convert Datetime to Utcdatetime so that addhours can run. I have a code like this: 

ttsBegin;
                        PickPackShip = null;
                        select forupdate PickPackShip where PickPackShip.PONum == PONum
                            && PickPackShip.DeliveryNum == DeliveryNum;
                        PickPackShip.PONum          = PONum;
                        PickPackShip.DeliveryNum    = DeliveryNum;
                PickPackShip.StartPicking   = DateTimeUtil::addHours(DateTimeUtil::newDateTime((str2Datetime(StartPicking, 321)), 0), -7);
                PickPackShip.EndPicking     = DateTimeUtil::addHours(DateTimeUtil::newDateTime((str2Datetime(EndPicking, 321)), 0), -7);
                PickPackShip.StartPacking   = DateTimeUtil::addHours(DateTimeUtil::newDateTime((str2Datetime(StartPacking, 321)), 0), -7);
                PickPackShip.EndPacking     = DateTimeUtil::addHours(DateTimeUtil::newDateTime((str2Datetime(EndPacking, 321)), 0), -7);
                PickPackShip.StartShipment  = DateTimeUtil::addHours(DateTimeUtil::newDateTime((str2Datetime(StartShipment, 321)), 0), -7);
                PickPackShip.InventSiteId   = purchTable.InventSiteId;
                        if(PickPackShip.RecId)
                        {
                            PickPackShip.doUpdate();
                        }
                        else
                        {
                            PickPackShip.DateTime   = runDateTime;
                            PickPackShip.insert();
                        }
                        
                        ttsCommit;



When run, an error appears "The value that you are trying to add or subtract creates invalid utcdatetime."

Someone can help me?

Thanks

Viewing all articles
Browse latest Browse all 143529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>