- Posts: 3
- Thank you received: 0
Date question with CSV export
14 years 6 months ago #41688
by mbolton01
Date question with CSV export was created by mbolton01
I searched the forum and could not find an answer to this problem I am seeing.
When I export orders from the sales screen, the order_created and order_modified fields do not display as a date in Excel 2007. When I attempt to apply the date format I get all "#" displayed in the Excel cell.
However, registerdate and lastvisit date display fine in excel.
I am using 1.5.6 starter with Joomla 2.5.1, and the default semicolon as the delimeter for the CSV file.
Can someone please help with this?
When I export orders from the sales screen, the order_created and order_modified fields do not display as a date in Excel 2007. When I attempt to apply the date format I get all "#" displayed in the Excel cell.
However, registerdate and lastvisit date display fine in excel.
I am using 1.5.6 starter with Joomla 2.5.1, and the default semicolon as the delimeter for the CSV file.
Can someone please help with this?
Please Log in or Create an account to join the conversation.
14 years 6 months ago #41836
by mbolton01
Replied by mbolton01 on topic Re: Date question with CSV export
Could you please point me in the right direction to understand these dates? I want to upgrade to the business version but I need to know I can get the right data to download to quickbooks... Thanks in advance...
Please Log in or Create an account to join the conversation.
14 years 6 months ago #41860
by nicolas
Replied by nicolas on topic Re: Date question with CSV export
Hi,
These fields use the unix timestamp format which is not understood by excel as a date.
If you want to change that, you need to edit the file "export" of the view "order" of your back end template via the menu Display->Views and add the code:
before the code:
Then, when you export, you should get dates properly displayed by excel.
These fields use the unix timestamp format which is not understood by excel as a date.
If you want to change that, you need to edit the file "export" of the view "order" of your back end template via the menu Display->Views and add the code:
Code:
if(in_array($key,array('order_created','order_modified'))){
$val=hikashop_getDate($val);
}
Code:
echo '"'.str_replace('"','""',$val).'"';
The following user(s) said Thank You: mbolton01
Please Log in or Create an account to join the conversation.
14 years 6 months ago - 14 years 6 months ago #41863
by mbolton01
Replied by mbolton01 on topic Re: Date question with CSV export
Thank you, I will try this today...
Works great - Thank you very much...
Works great - Thank you very much...
Last edit: 14 years 6 months ago by mbolton01.
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42586
by raydesign
Replied by raydesign on topic Re: Date question with CSV export
Nicolas,
I'm experiencing the same issue with the dates when exporting sales as CSV.
I tried to add the code you provided, but I can not get it to work.
I still get the ### when formatting as date in excel.
Could you please post an example of the original code, WITH the added code inside,
so I can see exactly where it goes?
Thanks
I'm experiencing the same issue with the dates when exporting sales as CSV.
I tried to add the code you provided, but I can not get it to work.
I still get the ### when formatting as date in excel.
Could you please post an example of the original code, WITH the added code inside,
so I can see exactly where it goes?
Thanks
Please Log in or Create an account to join the conversation.
14 years 6 months ago #42721
by nicolas
Replied by nicolas on topic Re: Date question with CSV export
If you don't see any difference, it's probably that you edited the file for the wrong template. Make sure that you do it for your back end template and it will work.
Please Log in or Create an account to join the conversation.
Time to create page: 0.170 seconds