date format not correct in excel
Posted: Wed Feb 10, 2021 9:11 am
Hi all!
I'm exporting some unstructured data to excel. One of the series is a stacked "period" series, that is the stacked date.
It seems no matter which way I try to format the data excel is reading it incorrectly.
Here is the workfile and code.
Any and all help is, as always greatly, appreciated!
Thanks!
Bob
I'm exporting some unstructured data to excel. One of the series is a stacked "period" series, that is the stacked date.
It seems no matter which way I try to format the data excel is reading it incorrectly.
Here is the workfile and code.
Any and all help is, as always greatly, appreciated!
Thanks!
Bob
Code: Select all
wfopen usl48_stdata
%exstart = "2016"
%exend = hsto001_1.@last
wfcreate(wf=gpcm_storage, page=data) m %exstart %exend
alpha stor_plan="February2021"
copy usl48_stdata::export\hsto*_1 gpcm_storage::data\hsto*_1
copy usl48_stdata::export\lsto*_1 gpcm_storage::data\lsto*_1
wfclose usl48_stdata
wfopen can_stdata
copy can_stdata::export\hsto*_1 gpcm_storage::data\hsto*_1
copy can_stdata::export\lsto*_1 gpcm_storage::data\lsto*_1
wfclose can_stdata
wfsave gpcm_storage
group g_hex hsto*_1
group g_lex lsto*_1
series period=@dateval(@datestr(@date))
pagestack(page=hsto) h? @ h? period Stor_Plan
alpha stor_code = @left(var01,6)
rename h Max_Qty
group g_copy period stor_code max_qty Stor_Plan
pageselect data
pagestack(page=lsto) l? @ l?
rename l min_qty
!end = @obsrange
pagecreate(page=export) u 1 !end
copy(g=d) hsto\g_copy export\g_copy
copy lsto\min_qty export\min_qty
pagesave(t=excel, mode=update) c:\warem32\gpcm_data_lto.xlsx range="input" @keep Stor_Plan Stor_Code Period Min_Qty Max_Qty