1. Menna Pablo Javier
  2. PowerBuilder
  3. Tuesday, 26 October 2021 19:10 PM UTC

Hi everyone!

On my system, I have many reports where I use datetime fields inside datawindows. I have a functionality by which I export the data. For this I use the SaveAs () method, with the CSV! and Clipboard!

The problem is that when opening the csv file or pasting the clipboard in Excel, it doesn't recognize the datetime fields as valid dates.

An alternative would be to modify the datetime fields by date, but the datawindows are very many.

Any ideas on how to make excel recognize the dates as valid?

Regards and thank you all.

Shekar Reddy Accepted Answer Pending Moderation
  1. Tuesday, 26 October 2021 22:24 PM UTC
  2. PowerBuilder
  3. # 1

Try applying a mask and format on the date or date/time fields before exporting to Excel.

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 26 October 2021 21:16 PM UTC
  2. PowerBuilder
  3. # 2

What is the current column TYPE definition? Is it DATE? DATETIME? GENERAL?


It seems to me that you have two choices: modify the DWOs to match the type specified in the Excel worksheets, or modify the TYPE in the Excel worksheets to match your DWOs. IMHO it would be much easier to modify the data type of tje relevant columns in the Excel templates.

 

 

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 26 October 2021 20:43 PM UTC
  2. PowerBuilder
  3. # 3

Are you experiencing this issue due to international/localization differences? The format of dates can vary, depending on the localization setting in use. If the DW's are producing output in one localization and Excel is expecting a different one, that might be causing your problem. I don't experience this issue on my workstation.

Can you copy/paste an example of how a datetime value is being saved in a CSV file from a DataWindow?

Best regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.