1. Géza Bartha
  2. PowerBuilder
  3. Monday, 28 October 2019 10:09 AM UTC

Hi!

I use .NET webservices in PB 2017 R3 1880. How to use the datetime parameters? How to set output string format of datetime to parse in server (Glassfish)?

 

Regards,

Géza

 

Géza Bartha Accepted Answer Pending Moderation
  1. Wednesday, 30 October 2019 07:55 AM UTC
  2. PowerBuilder
  3. # 1

Hi!

It is impossible, the Datetime parameter is input parameter of webservice. I have to use the webservice (.NET), and I have to preformat the date for input xml to interpret in government's server. The preformatted xml with date parameter have to in the xml tag.

Regards, Géza

.

 

 

 

Comment
There are no comments made yet.
Géza Bartha Accepted Answer Pending Moderation
  1. Tuesday, 29 October 2019 07:36 AM UTC
  2. PowerBuilder
  3. # 2

Hi Chris!

 

The webservice published by government organisation, we cannot changed it. They use

UTC : 2019-10-29T07:31:29Z

or

ISO-8601 :  2019-10-29T07:31:29+0000

time format.

I would like to set this format in the webservice, but I think it is impossible. I should make any workaround for this problem.

Thx, for your reply

 

Regards, Géza

 

 

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 29 October 2019 15:54 PM UTC
PB does not support directly in its DT to String formating. So you would have two choices:

1) Use a Format Mask in the String ( ) function. For example (in pseudo code) ...

ls_date_time = String ( ldt_date_time, "YYYY-MM-DD HH:MM:SS:TTT" )

ls_date_time = Replace (" " with "TO" in ls_date_time )

ls_date_time = Replace (":" by TTT with "+") // - OR -

2) Hand code the formatting, as follows:

ls_date_time = String (ld_date, "YYYY-MM-DD") + "TO" + String (lt_time, "HH:MM:SS") + &

"+" + MID (String (lt_time, "HH:MM:SS:TTT"), 8, 4)

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 28 October 2019 18:14 PM UTC
  2. PowerBuilder
  3. # 3

HI Géza;

    Normally, most MS-Window Apps & Web Services follow the ANSI standard for DateTime, as follows: "YYYY-MM-DD HH:MM:SS:TTT". Best to check with your WS developers though on what they are expecting.

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.