when Trying to read a CSV file to collection

harishpulipati

New Member
Hi All,

I am trying to read CSV file to a collection which has one of the field as date. This is being interpreted as a wrong date . How to switch off this interpretation and get the date as is i.e as Text.
 

cs.andras

Active Member
Hi,
A bit more detail wouldn't help to be honest, what is wrong with the date? What are the formats...etc.
 

harishpulipati

New Member
Hi Andras,

In my CSV file there is one field which shows the date, please find the attached screen shot, when i am reading the CSV file by using "Get CSV Text As Collection" action . By default blueprism show the filed as "Date and time" in collection please find the screen shot. what my requirment is i need only date or it should be come like Text format. Please advice on this issue.
 

Attachments

  • Capture.PNG
    Capture.PNG
    3.4 KB · Views: 333
  • Collection.PNG
    Collection.PNG
    9.1 KB · Views: 354

VJR

Well-Known Member
Hi harishpulipati,

In the 2nd screenshot that you showed, go to the Fields tab -> Add 4 fields if not already there -> Process Run Date (with DataType as Date) | Success (Number | Failure (Number) | TotalRuns (Number).

The important part is the one in the bold text mentioned above. This will solve your problem.
 

Vimal25

Member
Hi VJR,

Yes I satisfied with you comment , But please let me know , why again 4 fields are required to be created , already data and columns both are imported to collection from CSV . I know this is undefined collection and you are talking about defined collection related points . Please provide comment on my confusion.

#Vimal
 

VJR

Well-Known Member
Hi Vimal25,

Blue Prism by default took the data type coming from the Excel source data as DateTime. We overrode that by defining our own data type in the column headings.
If this resolved your original issue can you please mark the thread as Solved so that it is closed.
 

harishpulipati

New Member
Hi VJR,

Thanks for your reply.
After trying your solution we still haven't been able to stop BP interpreting the values as date. Please find the screen shots below.Instead of giving theDate field as Date we are giving it as more generic text.
 

Attachments

  • Current Values.PNG
    Current Values.PNG
    10.4 KB · Views: 171
  • filed snap.PNG
    filed snap.PNG
    9.9 KB · Views: 164

VJR

Well-Known Member
Hi harishpulipati,

Please refer the attached screenshots.
Before1.jpg - No fields in the collection. Default before running the process
Before2.jpg - Showing output with Date and Time
After1.jpg - Added 3 new fields with 1st column as Date datatype
After2.jpg - Now showing output with only Date
Action Properties.jpg - Action properties for Get CSV Text a collection
 

Attachments

  • Before 1.JPG
    Before 1.JPG
    25.8 KB · Views: 215
  • Before 2.JPG
    Before 2.JPG
    32.1 KB · Views: 219
  • Action Properties.JPG
    Action Properties.JPG
    40.7 KB · Views: 217
  • After 1.JPG
    After 1.JPG
    29.6 KB · Views: 196
  • After 2.JPG
    After 2.JPG
    30.6 KB · Views: 188

harishpulipati

New Member
Hi VJR,

Thank you very much. We had tried with date and its working fine, but we actually wanted for it to be interpreted as just plain text.
 

VJR

Well-Known Member
Hi harishpulipati,

Is there any specific reason to have the Date column in text so that a solution can be thought of in that context?
 
Top