source: smart/trunk/p/C0SUTIL.m@ 1545

Last change on this file since 1545 was 1540, checked in by Sam Habiel, 12 years ago

Updated routines per the KIDS build

File size: 1.3 KB
Line 
1C0SUTIL ; GPL - Smart Processing Utilities ;2/22/12 17:05
2 ;;1.0;VISTA SMART CONTAINER;;Sep 26, 2012;Build 2
3 ;Copyright 2012 George Lilly. Licensed under the terms of the GNU
4 ;General Public License See attached copy of the License.
5 ;
6 ;This program is free software; you can redistribute it and/or modify
7 ;it under the terms of the GNU General Public License as published by
8 ;the Free Software Foundation; either version 2 of the License, or
9 ;(at your option) any later version.
10 ;
11 ;This program is distributed in the hope that it will be useful,
12 ;but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;GNU General Public License for more details.
15 ;
16 ;You should have received a copy of the GNU General Public License along
17 ;with this program; if not, write to the Free Software Foundation, Inc.,
18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ;
20 Q
21 ;
22SPDATE(ZDATE) ; extrinsic which returns the Smart date format yyyy-mm-dd
23 ; ZDATE is a fileman format date
24 N TMPDT
25 S TMPDT=$$FMTE^XLFDT(ZDATE,"7D") ; ordered date
26 S TMPDT=$TR(TMPDT,"/","-") ; change slashes to hyphens
27 I TMPDT="" S TMPDT="UNKNOWN"
28 N Z2,Z3
29 S Z2=$P(TMPDT,"-",2)
30 S Z3=$P(TMPDT,"-",3)
31 I $L(Z2)=1 S $P(TMPDT,"-",2)="0"_Z2
32 I $L(Z3)=1 S $P(TMPDT,"-",3)="0"_Z3
33 Q TMPDT
34 ;
Note: See TracBrowser for help on using the repository browser.