- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date problem while exporting to excel using macro
Hi all,
I created a macro to export a table to excel, but unfortunately the some dates in excel are different from the original table.
For example: In original date I have 06/05/2013 but when I export using the macro the date comes to 05/06/2013. Only with some dates. Most of them I get the expected result.
I have tried putting Date(field, "DD/MM/YYYY") on script and also on table properties but no success at all.
Do you guys have some ideia on how to workaround that?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the variables in the "Main" script window, make sure you have the below entry..
SET DateFormat='MM/DD/YYYY';
Hope this helps...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
=date#(<date filed>,'DD/MM/YYYY')
or
=date(date#(<date filed>,'DD/MM/YYYY'),<Formt code>)
To convert in Excel, click column A and chcnge the format to Short Date.Then select Data|Text to columns and click Finish
Instead of using Send to Excel:
If you are using the IE PlugIn, you can right-click and choose Copy to Clipboard|Full Table. Then paste into Excel
Or Right-Click and Export to csv. Then open in Excel.
Some time on charts, that needs exporting we ended up giving Fast Change option to clients.
Also check this link:
Date changes to Number when export to Excel | Qlik Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all
In the script code, format all dates as date(<date filed>,'YYYY/MM/DD'). When it exported, the date format turns automatically into DD/MM/YYYY for some unknown reason. But it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I face the same issue.
Did you found a solution please?
Thank you