|
I'll take a shot at helping you with this...see the following code...
D currentDateISO...
D S D inz(*loval)
D currentTimeISO...
D S T inz(*loval)
D currentTimestamp...
D S Z inz(Z'0001-01-01-00.00.00.000000')
currentDateISO = %date();
currentTimeISO = %time();
monitor;
currentTimestamp = %timestamp(
%char(currentDateISO : *ISO0) +
%char(currentTimeISO : *ISO0) +
'000000' : *ISO0);
on-error;
currentTimestamp = *loval;
endmon;
___________________________________________________________
Paul Reid
Application Developer III
Erb Group of Companies | 290 Hamilton Road | New Hamburg, Ontario | N3A
1A2
Phone: 519.662.6133 ext. 2363
Web: http://www.erbgroup.com/
From: Gqcy<gmufasa01@xxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 10/21/2014 11:48 AM
Subject: convert a time date string into a timestamp
Sent by: "RPG400-L"<rpg400-l-bounces@xxxxxxxxxxxx>
I have been looking for examples to convert the following string into
a valid timestamp:
"2014-07-25 08:28:04 AM"
I initially made a DS breaking apart date from time,
but I am now having trouble with the time string...
time_a = %char(%time(time_part:*usa):*ISO);
is not working...
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.