Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

date format

Former Member
0 Likes
538

hi folks,

I am reading the date from the table in 'mmddyyyy' and I want to modify the date to this format 'mm/dd' how to do that?

thanks

Santhosh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
475

Hi,

Alternatively you can use concatenate statement.

concatenate date0(2) date2(2) into monthday separated by '/'.

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
475


data: date(10) type c value '07122005'.
data: monthday(5) type c.

monthday+0(2) = date+0(2).
monthday+2(1) = '/'.
monthday+3(2) = date+3(2).


Write monthday.

Just wondering why the data is being stored like mmddyyyy. Shouldn't it be being stored as yyyymmdd?

Regards,

Rich Heilman

Read only

0 Likes
475

Thanks Rich.

Read only

Former Member
0 Likes
476

Hi,

Alternatively you can use concatenate statement.

concatenate date0(2) date2(2) into monthday separated by '/'.

Read only

0 Likes
475

Thanks a lot