Announcements
localDateTime = localDateTime.AddMilliseconds(timeMS);
System.DateTime utcTimeNow = System.DateTime::Now;
System.DateTime localDateTime = DateTimeUtil::applyTimeZoneOffset(utcTimeNow, DateTimeUtil::getUserPreferredTimeZone());
int timeMS = utcTimeNow.Millisecond;
localDateTime.AddMilliseconds(timeMS);
str myString = localDateTime.ToString('yyyyMMdd_HHmmssffff');
ttsbegin;
logTable.clear();
logTable.ID = myString;
System.Exception ex;
try
{
System.DateTime localDateTime = DateTimeUtil::applyTimeZoneOffset(System.DateTime::Now, DateTimeUtil::getUserPreferredTimeZone());
TimeInMS timeMS = System.DateTimeOffset::Now.Millisecond;
ttsbegin;
logTable.clear();
str s1_timeMS = int2Str(timeMS);
str s2_timeMS = subStr(s1_timeMS,strLen(s1_timeMS)-4, strLen(s1_timeMS));
str s3_timeMS = strRFix(s2_timeMS, 4, "0");
logTable.ID = strFmt("%1%2",localDateTime.ToString('yyyyMMdd_HHmmss'), s3_timeMS);
logTable.insert();
ttscommit;
}
catch(ex)
{
str exMessage = ex.Message;
ttsbegin;
logTable.clear();
logTable.ID = strFmt("%1%2",systemDateGet(), "0000");
logTable.Response = exMessage;
logTable.insert();
ttscommit;
}
System.DateTime utcTimeNow = System.DateTime::Now;
System.DateTime localDateTime = DateTimeUtil::applyTimeZoneOffset(utcTimeNow, DateTimeUtil::getUserPreferredTimeZone());
int timeMS = utcTimeNow.Millisecond;
localDateTime.AddMilliseconds(timeMS);
myString = localDateTime.ToString('yyyyMMdd_HHmmssffff');
System.Exception ex;
try
{
...
}
catch (ex)
{
...
}
try
{
System.DateTime localDateTime = DateTimeUtil::applyTimeZoneOffset(System.DateTime::Now, DateTimeUtil::getUserPreferredTimeZone());
TimeInMS timeMS = System.DateTimeOffset::Now.Millisecond;
ttsbegin;
logTable.clear();
logTable.ID = strFmt("%1%2",localDateTime.ToString('yyyyMMdd_HHmmss'), strRFix(int2str(timeMS), 4, "0"));
str logId = logTable.ID;
.
.
logTable.insert();
ttscommit;
}
catch (Exception::CLRError)
{
System.Exception e;
e = CLRInterop::getLastException();
if (e != null)
{
e = e.InnerException;
ttsbegin;
logTable.clear();
logTable.ID = strFmt("%1%2",systemDateGet(), "0000");
logTable.Response = e.ToString();
logTable.insert();
ttscommit;
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,734 Super User 2024 Season 2
Martin Dráb 229,021 Most Valuable Professional
nmaenpaa 101,150