Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
In UniData you can put multiple conversion codes is a single OCONV separated by @VM.
YYYYMMDD = OCONV(@DATE, “DYMD”:@VM:”MCN”)
HHMMSS = OCONV(@TIME, "MTHS":@VM:"MCN")
Just curious if this helps you.
David
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
Thanks, I was aware of that. Just looking for the most efficient way of getting HHMMSS without multiple conversions. I don't understand the documentation when is shows what looks like the date format string, but I can't get it to work at all. Just returns the internal time with milliseconds. I did not look at the STATUS() but I'm sure it says I am in error.
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
I will need to investigate some more. I tried using the syntax to replace the ":" delimiter with another character (including the empty string) and the conversion fails. It returns the internal time and the STATUS() is set to 2.
>COPYP BP JON (TSN
JON
CRT OCONV(@TIME,"MTHS'='")
CRT STATUS()
END
>RUN BP JON
57219
2
>
I will let you know what I find.
Thanks,
Neil
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
TIM: 00:25: ITIM: 1500
002500
OCONV(1500,'MTS'): 00:25:00 STATUS:0
OCONV(1500,'MTS_'): 00_25_00 STATUS:0
OCONV(1500,'MTS{'): 00{25{00 STATUS:0
OCONV(1500,'MTH'): 12:25am STATUS:0
OCONV(1500,'MTP'): am12:25 STATUS:0
OCONV(1500,'MTZ'): 0:25 STATUS:0
OCONV(1500,'MTS["","",""]'): 002500 STATUS:0
TIM: 16:25: ITIM: 59100
OCONV(59100,'MTS'): 16:25:00 STATUS:0
OCONV(59100,'MTS_'): 16_25_00 STATUS:0
OCONV(59100,'MTS{'): 16{25{00 STATUS:0
OCONV(59100,'MTH'): 04:25pm STATUS:0
OCONV(59100,'MTP'): pm04:25 STATUS:0
OCONV(59100,'MTZ'): 16:25 STATUS:0
OCONV(59100,'MTS["","",""]'): 162500 STATUS:0
>
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
Huzzah! Thank you Mike. Just what I was looking for. Documentation could use a bit of improvement here. Many thanks!
Jon
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
Also, I am not using NLS and I am using Information flavor.
Running UniVerse 11.3.1 on Redhat.
I have been using the data conversion OCONV(DATE(),"DYMD[4'',2'',2]" then the 4'' (2-single quotes) and 2'' (2-single quotes) provides the date in YYYYMMDD without dashed or slashes. Works great.
The BASIC Manual Page 533 shows MT [H] [P] [Z] [S] [c] [[f1, f2, f3]]. I've tried different variations of "MTS''[2,2,2]" (S'' is two single quotes). Is there a way to convert a time into HHMMSS without using a second function to strip away the ':'s.
Jon
In regards to the documentation...My second page of my TCL HELP CONV MT output is worded like my 11.2.5 UV Basic User Guide pdf. In the pdf on page C-42 second paragraph, second sentence says "Enclose the separator...". If using "c", it is in quotes if after MT like 'MT.' .If using the format modifier, the separators must be in quotes to override the "c" parameter or the default separator, or it fails...I think. So, some documentation examples might be the easiest way to clarify things.
Below us another set of tests..
TIME TEST 2 CODE AND OUTPUT:
TIM: 00:25: ITIM: 1500
'1. ':OCONV(ITIM,'MT.') 1. 00.25 STATUS:0
'2. ':OCONV(ITIM,'MTS.') 2. 00.25.00 STATUS:0
'3. ':OCONV(ITIM,'MTS{') 3. 00{25{00 STATUS:0
'4. ':OCONV(ITIM,'MTS-,[".",".","."]') 4. 1500 STATUS:2
'5. ':OCONV(ITIM,'MTS"-",[".",".","."]') 5. 1500 STATUS:2
'6. ':OCONV(ITIM,'MTS-,[.,".","."]') 6. 1500 STATUS:2
'7. ':OCONV(ITIM,'MTS,[.,".","."]') 7. 1500 STATUS:2
'8. ':OCONV(ITIM,'MTS,[,".",]') 8. 00,25.00 STATUS:0
'9. ':OCONV(ITIM,'MTS-,[,".",]') 9. 1500 STATUS:2
'10. ':OCONV(ITIM,'MTS[,".",]') 10. 00:25.00 STATUS:0
'11. ':OCONV(ITIM,'MTS}[,".",]') 11. 00}25.00 STATUS:0
>
Thanks
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.