Saturday, February 11, 2012   
 Search   
 

http://www.foxfirereporting.com
Register  Login  
Forums  
      
 Forums    
SearchForum Home
  Support  Foxfire! 8+ Support  Date format in ...
 Date format in export to Excel
 
 7/21/2009 4:45:50 PM
manhaveh
23 posts
www.jackson-lloyd.com


Date format in export to Excel

The date format appears to be set to dd/mm/yy because when I export to Excel, that is how it shows up as text.  Where do I go to make sure it is set as mm/dd/yy?  The report displays it fine as mm/dd/yy, it just happens when I send it to Excel, it appears.

Thanks,

Hans

 7/22/2009 5:00:41 AM
AndrewM
145 posts
www.aksel.com
5th


Re: Date format in export to Excel
Hans,

Check your display settings in Excel - that may be what is affecting it. The other thing to try is to export the file into a CSV file and see if the problem still occurs - if so, then it's definitely Excel that is affecting it.


Andrew
 7/22/2009 8:55:54 AM
manhaveh
23 posts
www.jackson-lloyd.com


Re: Date format in export to Excel
Export as Excel-formatted works fine, other than that I really don't want that effect.  Export as Excel/XLS is what has the problem, importing as text values, 05-Jul-09 etc.   I can fix that with text-to-columns, but it would be nicer to have it without needing to correct.  ASCII-Tab Delimited does nothing.  No file save box opens, I figured that option would be the CSV saving, but it doesn't do anything.
 7/22/2009 3:59:54 PM
manhaveh
23 posts
www.jackson-lloyd.com


Re: Date format in export to Excel

I am pretty sure this is something in FoxFire!  I created another data item from another table but using the same function (CTOD) and that field exported correctly to Excel on the same run that produced the 05-Jul-09 text entries.  Doing more research for this is interesting.  If one field is wrongly formatted but the field next to it is fine, using the same definition, just a different table, there got to be some setting somewhere defining it differently.

 7/22/2009 4:49:05 PM
manhaveh
23 posts
www.jackson-lloyd.com


Re: Date format in export to Excel

And part of the answer is ....

Define the data item as characters instead of as date.  It is a CTOD(STRTRAN(....)) function result.  Defining as character auto adds a PADR() around the whole thing.  Result is that when send to Excel a text value in the right format arrives in Excel which can then be easily converted into a real date value using the text-to-column feature of Excel and then apply whatever formatting is wanted.  A macro will quickly do something like that.

I think I can live with this until knowledge increases.

Hans

  Support  Foxfire! 8+ Support  Date format in ...
   
SearchSearch  Forum HomeForum Home     
 Links    
   
  
Downloaded from DNNSkins.com