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
663

how to populate the date field in mm/dd/yyyy format, into an output field, while the data is coming in from RSDDAGGRDIR table in DEC format.

6 REPLIES 6
Read only

Former Member
0 Likes
637

Hi,

Generally Timstamp data is stored in the format (YYYYMMDDhhmmss) in DEC type.

so declare

data: date(8), and Date1(10)

date = timestamp+0(8). YYYYMMDD

move date to date1 or

write date to date1 in the required format

or separate Day, month ,year separately and concatenate and write.

reward points if useful

regards,

ANJI

Read only

0 Likes
637

hi Anji,

I am getting the timestmp from RSDDAGGRDIR table into an internal table, and then modifying it, by taking the timestmp value into a variable and then modifying the value in the variable, and then appending the varible into the internal table and populate the output from the internal table.

But, the problem is that the modified variable value is not getting appended to the internal table......

please help me out.......

Read only

Former Member
0 Likes
637

Hi,

If your date is coming mm.dd.yyyy like this

Ex : date = 22.03.2007.

CONCATENATE date0(2) '/' date2(4) '/' date+4(8) into date.

Don't forget to reward if useful..

Read only

Former Member
0 Likes
637

Hi..

the field is in format..(YYYYMMDDhhmmss) = mm/dd/yyyy

w_date(15) type c.

w_final(10) type c.

w_date = lastupdate.

<b>concatenate w_date4(2) '/' w_date6(2) '/' w_date+0(4) into w_final.</b>

write: w_final.

Read only

Former Member
0 Likes
637

Use the WRITE... TO statement.

WRITE <date> TO <output field>.

Read only

Former Member
0 Likes
637

Hi Hitesh,

Absolutly agree with Anji solution. You can try with that,

Reply for queries, Shall post you the updates.

Regards.

Kumar. .