If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Double Quotes for Date Field

Started by jason.haskins, 12 Apr 2021 10:02:15 AM

Previous topic - Next topic

jason.haskins

I have the need to create a .CSV file to send to a vendor which has a requirement for the data to be enclosed in double quotes.  I have been able to get this to work for all the fields within the file using the '""+[filename]+''' syntax.  However, on a field that contains a date (MM/DD/YYYY), it will not validate.  Is there a way that I can enter this to validate it and produce "MM/DD/YYYY" in the field?

MFGF

Quote from: jason.haskins on 12 Apr 2021 10:02:15 AM
I have the need to create a .CSV file to send to a vendor which has a requirement for the data to be enclosed in double quotes.  I have been able to get this to work for all the fields within the file using the '""+[filename]+''' syntax.  However, on a field that contains a date (MM/DD/YYYY), it will not validate.  Is there a way that I can enter this to validate it and produce "MM/DD/YYYY" in the field?

Hi,

Assuming the date is currently defined as a Date datatype item in your report, you'll probably need to cast the date to a character string. To get the format you need, you may end up having to extract each part of the date (month, day and year) using the Extract() function then cast these integer results to character strings, adding the '/' delimiters.

Cheers!

MF.
Meep!