This tag refers to the process of converting the data type of one piece of information into another type.
Questions tagged [data-conversion]
1963 questions
9
votes
5 answers
Why am I getting a "[SQL0802] Data conversion of data mapping error" exception?
I am not very familiar with iseries/DB2. However, I work on a website that uses it as its primary database.
A new column was recently added to an existing table. When I view it via AS400, I see the following data type:
Type: S
Length: 9
Dec: 2
This…

Eric Belair
- 10,574
- 13
- 75
- 116
8
votes
1 answer
Send numpy array as bytes from python to JS through Flask
A numpy array should be sent from python to JS through flask. I don't want to jsonify it and send as it would increase the size of the response and eventually the response time. So I thought I could convert numpy into bytes using tobytes(), send the…

Suba Selvandran
- 304
- 2
- 16
8
votes
2 answers
Convert nested JSON array into separate columns in CSV file
I have a JSON file that looks like this:
{
"id": 10011,
"title": "Test procedure",
"slug": "slug",
"url": "http://test.test",
"email": "test@test.com",
"link": "http://test.er",
"subject": "testing",
"level": 1,
…

user2758935
- 131
- 1
- 1
- 8
8
votes
2 answers
Converting array to matrix in R
I have an array, including two proficiency variables (theta0, theta1) over an item (Yes, No) called "comp". This needs to be converted to one matrix. Is there any way that I could convert a matrix like the one at the bottom?
My array looks like…

amisos55
- 1,913
- 1
- 10
- 21
8
votes
3 answers
RTF Format in Web Text Editor
Is there a text editor on the web that supports input from RTF-formatted documents?
I know it is a bit of an odd request for webdev, but I need to read RTF documents from the database and edit them in a web-based text editor and store it back in…

treeblah
- 1,205
- 2
- 11
- 26
8
votes
2 answers
converting a Python string to float only fails with PyInstaller
I have a program that works fine, but when I make it into an executable via PyInstaller, I have problems. I traced this down to a weird behavior that demonstrates the problem. In main(), I place the following statement:
print float('1e-07')
When I…

Pete P
- 1,048
- 7
- 12
8
votes
1 answer
Converting polygon coordinates from Double to Long for use with Clipper library
I have two polygons with their vertices stored as Double coordinates. I'd like to find the intersecting area of these polygons, so I'm looking at the Clipper library (C++ version). The problem is, Clipper only works with integer math (it uses the…

tommaisey
- 449
- 2
- 10
8
votes
8 answers
Input an integer, find the two closest integers which, when multiplied, equal the input
Ok my problem is of mathematical nature.
I have an array of bytes whose length is X, i need to find the two closest numbers which multiplied together equal X.
I need to do this because i am bulding a bitmap from an array of bytes and i need to make…

user1909612
- 273
- 5
- 14
7
votes
4 answers
How to convert string to decimal in powershell?
I have a string,
$string = "2,55"
How to convert this string to decimal?

AlexandreP
- 87
- 1
- 1
- 6
7
votes
1 answer
Read COBOL COMP data in C#
I'm new to COBOL and I have been trying to read record information from a text file that is an output from the table.
Most non-comp data-types i'm okay with, it's the 'COMP' ones i'm getting stuck on.
I've been trying to figure this out all day…

ThatUser
- 487
- 6
- 11
7
votes
1 answer
How do you convert third party API data to a collection resource in Laravel 5.6?
I've been working on creating a clean interface for our various web application and I've run into a snag with Laravel's API Resources not properly converting the incoming json array into laravel collections.
I can do it with a single resource:
…

Mugluck
- 499
- 1
- 12
- 24
7
votes
1 answer
Convert number of days since Jan 1 2000 into date format
I have a column in my data as a number of days since Jan 1, 2000 (this is 0 day). How can I convert day number into date format (2000-01-01)?
Number_of_days Date
3536 2011-01-03
3537 2011-01-04
3538 …

Zmnako Awrahman
- 538
- 7
- 19
7
votes
0 answers
Convert JSON to Mysql database
I'm trying to convert an JSON data file into MySQL database with some kind of web or script that make me the change.
Somebody know any? or how i can do the change instead?
Thanks a lot

Liru
- 311
- 1
- 4
- 10
7
votes
3 answers
Mapping a ulong to a long in C#?
I am trying to map a ulong to a long (and vice-versa), and a uint to a int (and vice-versa), as shown below - in order to save the values in a MS-SQL-database with signed types integer and biginteger only.
I do this because I have to check (in the…
user7212775
7
votes
3 answers
"Conversion failed because the data value overflowed the specified type" error applies to only one column of the same table
I am trying to import data from database access file into SQL server. To do that, I have created SSIS package through SQL Server Import/Export wizard. All tables have passed validation when I execute package through execute package utility with…

Vadzim Savenok
- 930
- 3
- 14
- 37