Customize grid question

Have you tried using a BPM to populate a UD calculating this value into a time record?
On Friday, May 2, 2014 2:13 PM, Vic Drecchio <vic.drecchio@...> wrote:
 
<div id="ygrps-yiv-842965314yiv5169276405ygrp-text">
  
  
  <div class="ygrps-yiv-842965314yiv5169276405WordSection1"><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;">Not sure if this helps, but in Vantage 8.03 this works.&nbsp; This is in SQL format.&nbsp; This shows Start Time and End time in 24-hour format.&nbsp; This was a query I wrote to see Task history in the system.&nbsp; Perhaps you can do this in 4GL similarly. </span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;"> &nbsp;</span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;">SELECT</span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;"> &nbsp;</span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;">S.SysTaskNum AS &#39;TaskID&#39;,</span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span style="font-size:11.0pt;color:#1F497D;"> &nbsp;</span></div><div class="ygrps-yiv-842965314yiv5169276405MsoNormal"><span

style=“font-size:11.0pt;color:#1F497D;”>S.StartDate AS 'Date',

 
RIGHT('00' + CAST(cast((S.STARTTIME/60/60) as INT) AS VARCHAR(2)),2) + ':' +
RIGHT('00' + CAST(cast((S.starttime - (cast((S.STARTTIME/60/60) as INT))6060)/60 AS INT) AS VARCHAR(2)),2) + ':' +
RIGHT('00' + CAST(S.STARTTIME - ((cast((S.STARTTIME/60/60) as INT) 6060) + (cast((starttime - (cast((S.STARTTIME/60/60) as INT))6060)/60 AS INT) * 60)) AS VARCHAR(2)),2) AS 'StartTime',
 
RIGHT('00' + CAST(cast((S.ENDTIME/60/60) as INT) AS VARCHAR(2)),2) + ':' +
RIGHT('00' + CAST(cast((S.ENDTIME - (cast((S.ENDTIME/60/60) as INT))6060)/60 AS INT) AS VARCHAR(2)),2) + ':' +
RIGHT('00' + CAST(S.ENDTIME - ((cast((S.ENDTIME/60/60) as INT) 6060) + (cast((ENDtime - (cast((S.ENDTIME/60/60) as INT))6060)/60 AS INT) * 60)) AS VARCHAR(2)),2) AS 'EndTime',
 
S.endtime - S.starttime AS 'SecsElapsed',

 
UPPER(S.taskdescription) AS 'Task',
 
S.TaskStatus AS 'Status',
 
Upper(S.submituser) AS 'UserID',
 
UPPER(U.NAME) AS 'UserName',
 
UPPER(S.ActivityMsg) AS 'Comment'
 
FROM PUB.SysTask AS S
 
INNER JOIN PUB.UserFile AS U ON S.SubmitUser = U.DcdUserID
 
ORDER BY S.SysTaskNum DESC
 
 
 
Also, here is the format for Crystal:
 
// Formula to convert SysTime field

//

Local Numbervar Minute := ({PartTran.systime} mod 3600) / 60;

Local Numbervar Hour := Int ({PartTran.systime} / 3600);

Local Numbervar Second := (Minute mod 60) / 60;

Local StringVar Hr := ToText(Hour);

Local StringVar Min := If Len(ToText (Minute)) = 1 then "0" + ToText(Minute)
else ToText (Minute);

Local StringVar Sec := If Len(ToText (Second)) = 1 then "0" + ToText(Second)
else ToText (Second);

Hr + ":" + Min + ":" + Sec


 
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Rob Bucek
Sent: Friday, May 02, 2014 2:01 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage]
Customize grid question
 
 
Its seconds after midnight, so you won't be able to reformat it in any worthwhile manner (IMO) on a native grid because it is an integer data type. Also, attachments do not work in this forum.

In sql you would convert it with something like created_Date+cast(created_time / 86400.0 as datetime)

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-4832
FAX: (715)284-4084
[cid:1.234354861@…]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Kimberley White
Sent: Thursday, May 01, 2014 12:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Customize grid question

I am adding the
sys time to a grid but it is formated in numbers not a time stamp format. Anyone know or how to change this format. See attachment.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

</div>
 


<div class="ygrps-yiv-842965314yiv5169276405yqt0671387619" id="ygrps-yiv-842965314yiv5169276405yqt62543"><div style="color:#fff;height:0;"></div></div>
#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405 -- #ygrps-yiv-842965314yiv5169276405ygrp-mkp { border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp #ygrps-yiv-842965314yiv5169276405hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp #ygrps-yiv-842965314yiv5169276405ads {
margin-bottom:10px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp .ygrps-yiv-842965314yiv5169276405ad {
padding:0 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp .ygrps-yiv-842965314yiv5169276405ad p {
margin:0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mkp .ygrps-yiv-842965314yiv5169276405ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ygrp-lc {
font-family:Arial;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ygrp-lc #ygrps-yiv-842965314yiv5169276405hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ygrp-lc .ygrps-yiv-842965314yiv5169276405ad {
margin-bottom:10px;padding:0 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity span {
font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity span:first-child {
text-transform:uppercase;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity span a {
color:#5085b6;text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity span span {
color:#ff7900;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405activity span .ygrps-yiv-842965314yiv5169276405underline {
text-decoration:underline;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405attach div a {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405attach img {
border:none;padding-right:5px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405attach label {
display:block;margin-bottom:5px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405attach label a {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 blockquote {
margin:0 0 0 4px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405bold {
font-family:Arial;font-size:13px;font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405bold a {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 dd.ygrps-yiv-842965314yiv5169276405last p a {
font-family:Verdana;font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 dd.ygrps-yiv-842965314yiv5169276405last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 dd.ygrps-yiv-842965314yiv5169276405last p span.ygrps-yiv-842965314yiv5169276405yshortcuts {
margin-right:0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405attach-table div div a {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405attach-table {
width:400px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405file-title a, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405file-title a:active, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405file-title a:hover, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405file-title a:visited {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405photo-title a, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405photo-title a:active, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405photo-title a:hover, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div.ygrps-yiv-842965314yiv5169276405photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 div#ygrps-yiv-842965314yiv5169276405ygrp-mlmsg #ygrps-yiv-842965314yiv5169276405ygrp-msg p a span.ygrps-yiv-842965314yiv5169276405yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405green {
color:#628c2a;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405MsoNormal {
margin:0 0 0 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 o {
font-size:0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405photos div {
float:left;width:72px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405reco-category {
font-size:77%;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405reco-desc {
font-size:77%;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 .ygrps-yiv-842965314yiv5169276405replbq {
margin:4px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg table {
font-size:inherit;font:100%;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg select, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 input, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg pre, #ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 code {
font:115% monospace;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg * {
line-height:1.22em;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-mlmsg #ygrps-yiv-842965314yiv5169276405logo {
padding-bottom:10px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-msg p a {
font-family:Verdana;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-msg p#ygrps-yiv-842965314yiv5169276405attach-count span {
color:#1E66AE;font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-reco #ygrps-yiv-842965314yiv5169276405reco-head {
color:#ff7900;font-weight:700;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-reco {
margin-bottom:20px;padding:0px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ov li a {
font-size:130%;text-decoration:none;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ov li {
font-size:77%;list-style-type:square;padding:6px 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-sponsor #ygrps-yiv-842965314yiv5169276405ov ul {
margin:0;padding:0 0 0 8px;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-text {
font-family:Georgia;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-text p {
margin:0 0 1em 0;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-text tt {
font-size:120%;}

#ygrps-yiv-842965314 #ygrps-yiv-842965314yiv5169276405 #ygrps-yiv-842965314yiv5169276405ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-842965314



I am adding the sys time to a grid but it is formated in numbers not a time stamp format. Anyone know or how to change this format. See attachment.

[Non-text portions of this message have been removed]
Its seconds after midnight, so you won't be able to reformat it in any worthwhile manner (IMO) on a native grid because it is an integer data type. Also, attachments do not work in this forum.

In sql you would convert it with something like created_Date+cast(created_time / 86400.0 as datetime)

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-4832
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Kimberley White
Sent: Thursday, May 01, 2014 12:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Customize grid question



I am adding the sys time to a grid but it is formated in numbers not a time stamp format. Anyone know or how to change this format. See attachment.

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]

Not sure if this helps, but in Vantage 8.03 this works.  This is in SQL format.  This shows Start Time and End time in 24-hour format.  This was a query I wrote to see Task history in the system.  Perhaps you can do this in 4GL similarly.

 

SELECT

 

S.SysTaskNum AS 'TaskID',

 

S.StartDate AS 'Date',

 

RIGHT('00' + CAST(cast((S.STARTTIME/60/60) as INT) AS VARCHAR(2)),2) + ':' +

RIGHT('00' + CAST(cast((S.starttime - (cast((S.STARTTIME/60/60) as INT))*60*60)/60 AS INT) AS VARCHAR(2)),2) + ':' +

RIGHT('00' + CAST(S.STARTTIME - ((cast((S.STARTTIME/60/60) as INT) *60*60) + (cast((starttime - (cast((S.STARTTIME/60/60) as INT))*60*60)/60 AS INT) * 60)) AS VARCHAR(2)),2) AS 'StartTime',

 

RIGHT('00' + CAST(cast((S.ENDTIME/60/60) as INT) AS VARCHAR(2)),2) + ':' +

RIGHT('00' + CAST(cast((S.ENDTIME - (cast((S.ENDTIME/60/60) as INT))*60*60)/60 AS INT) AS VARCHAR(2)),2) + ':' +

RIGHT('00' + CAST(S.ENDTIME - ((cast((S.ENDTIME/60/60) as INT) *60*60) + (cast((ENDtime - (cast((S.ENDTIME/60/60) as INT))*60*60)/60 AS INT) * 60)) AS VARCHAR(2)),2) AS 'EndTime',

 

S.endtime - S.starttime AS 'SecsElapsed',

 

UPPER(S.taskdescription) AS 'Task',

 

S.TaskStatus AS 'Status',

 

Upper(S.submituser) AS 'UserID',

 

UPPER(U.NAME) AS 'UserName',

 

UPPER(S.ActivityMsg) AS 'Comment'

 

FROM PUB.SysTask AS S

 

INNER JOIN PUB.UserFile AS U ON S.SubmitUser = U.DcdUserID

 

ORDER BY S.SysTaskNum DESC

 

 

 

Also, here is the format for Crystal:

 

// Formula to convert SysTime field

//

Local Numbervar Minute := ({PartTran.systime} mod 3600) / 60;

Local Numbervar Hour := Int ({PartTran.systime} / 3600);

Local Numbervar Second := (Minute mod 60) / 60;

Local StringVar Hr := ToText(Hour);

Local StringVar Min := If Len(ToText (Minute)) = 1 then "0" + ToText(Minute)
else ToText (Minute);

Local StringVar Sec := If Len(ToText (Second)) = 1 then "0" + ToText(Second)
else ToText (Second);

Hr + ":" + Min + ":" + Sec


 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Rob Bucek
Sent: Friday, May 02, 2014 2:01 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Customize grid question

 

 

Its seconds after midnight, so you won't be able to reformat it in any worthwhile manner (IMO) on a native grid because it is an integer data type. Also, attachments do not work in this forum.

In sql you would convert it with something like created_Date+cast(created_time / 86400.0 as datetime)

Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-4832
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Kimberley White
Sent: Thursday, May 01, 2014 12:55 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Customize grid question

I am adding the sys time to a grid but it is formated in numbers not a time stamp format. Anyone know or how to change this format. See attachment.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]