View previous topic :: View next topic
|
Author |
Message |
Log Thangavel
New User
Joined: 19 Jan 2018 Posts: 18 Location: USA
|
|
|
|
Hi,
Pls let me know if we can able to get the UTC time in COBOL through any date time functions with out using DB2 |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
FUNCTION CURRENT-DATE provides a 21-character alphanumeric value with year, month, day, hour, minute, seconds, hundredths of a second, GMT offset sign, GMT offset hours and GMT offset minutes.
This could easily be found in the manual -- why are you not checking there first? |
|
Back to top |
|
|
Log Thangavel
New User
Joined: 19 Jan 2018 Posts: 18 Location: USA
|
|
|
|
Hi,
Thanks for you response. I knew that function already.
The UTC TS am looking for look like this
<timestamp>2018-01-10T15:00:05.216-06:00</timestamp> |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Are you SURE you belong on this forum for experts? The difference between the COBOL FUNCTION CURRENT-DATE and what you show in your post are minor format changes and hence well within a competent programmer's wheelhouse. The only real difference is that you would miss the thousandths of a second by using the COBOL function.
Perhaps you should start using Beginners and Students Forum instead of this one since it seems more on your level? |
|
Back to top |
|
|
Log Thangavel
New User
Joined: 19 Jan 2018 Posts: 18 Location: USA
|
|
|
|
Am not sure if you got the question. The last few thousand were the one is missing and was expecting an answer for it
And stop your advices even if you don’t respond |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
The last few thousand were the one is missing and was expecting an answer for it |
and yet you did not ask about this -- you asked about getting UTC time in COBOL. Your question was answered; it is not our fault if you did not clearly explain your requirement nor is it our fault if you failed to ask the right question. Note that fractions of a second are NOT required to be part of a timestamp so missing the thousandths of a second still means the COBOL FUNCTION CURRENT-DATE returns a valid timestamp.
Topic locked to prevent any further waste of time. |
|
Back to top |
|
|
|