×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Pass the desired output format into %DEC as parm 2.
CharacterTime = '13:35:26';
Monitor;
timeNum = %DEC( %TIME( characterTime : *HMS) : *HMS )
on-error;
clear timeNum;
Endmon;
CharacterDate = '10/25/2022';
Monitor;
dateNum = %DEC( %DATE( CharacterDate :*USA) : *ISO );
On-Error;
Clear DataNum;
Endmon;
--
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Dave
Sent: Tuesday, October 25, 2022 1:35 PM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Convert character field representing time to numeric
Hi,
Receiving time data from XML in HH:MM:SS format and need numeric HHMMSS.
Just starting out with the XML-INTO command.
Reading the time data into a data structure character field (I think this
is obligatory).
How can I get the time in the required format without doing daft
manipulations?
I have the same problem with the dates but
MyField = %DEC(%DATE(characterDate))
works.
Thanks
--
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.