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
10
votes
6 answers
How do I convert UTC/ GMT datetime to CST in Javascript? (not local, CST always)
I have a challenge where backend data is always stored in UTC time. Our front-end data is always presented in CST. I don't have access to this 'black box.'
I would like to mirror this in our data warehouse. Which is based in Europe (CET). So "local"…

user45867
- 887
- 2
- 17
- 30
10
votes
2 answers
How %a conversion work in printf statement?
Maybe this doesn't belong on SO but I don't know where else.
I have to reimplement printf(3) with C without using any function that would do the conversion for me, I'm nearly done, but I'm stuck on %a, I really don't understand what is happening…

ItsASecret
- 2,589
- 3
- 19
- 32
10
votes
1 answer
Hive - Converting a string to bigint
Suppose I have a string like '00321' and I want to convert it into a BIGINT in Hive, how would I do it?
Follow-up question: would the resulting BIGINT value be 321 or 00321?

activelearner
- 7,055
- 20
- 53
- 94
10
votes
2 answers
How can I get the traceback object ( sys.exc_info()[2] , same as sys.exc_traceback ) as a string?
I have a function which catches all exceptions, and I want to be able to get the traceback as a string within this function.
So far this is not working:
def handle_errors(error_type, error_message, error_traceback):
"""catch errors"""
…

mulllhausen
- 4,225
- 7
- 49
- 71
10
votes
1 answer
SSIS Convert string to a guid when importing and saving data
I was trying to convert a unicode string from an Excel File into a uniqueidentifier. There are already answers online that seem pretty straight forward:
I've seen this post: Data Conversion Issue in SSIS package - Text to GUID
and this post:…

SventoryMang
- 10,275
- 15
- 70
- 113
10
votes
7 answers
Reading Paradox Database files
I'm working with a client who has an existing system, built on what is apparently a Paradox database. I've got the database, in the form of a zip file containing .DB, .MB and .PX files, one for each table.
I need to take (some) of this data and…

MattBelanger
- 5,280
- 6
- 37
- 34
10
votes
2 answers
byte[] to ushort[]
Here is my question. Bear with me giving a little explanation:
I am reading tiff image into buffer; Each pixel of my tiff is represented by a ushort (16 bits data, non-negtive).
My image size is 64*64 = 4096. When my tiff is loaded into buffer,…

Nick Tsui
- 524
- 2
- 9
- 29
10
votes
5 answers
How to convert data stored in XML files into a relational database (MySQL)?
I have a few XML files containing data for a research project which I need to run some statistics on. The amount of data is close to 100GB.
The structure is not so complex (could be mapped to perhaps 10 tables in a relational model), and given the…

E.Z.
- 6,393
- 11
- 42
- 69
9
votes
1 answer
Is there a conversion tool for XML to YAML?
I have an XML file structure and I want to convert it to YAML file structure and probably also for the future use.
Could you please suggest/recommend me a conversion tool to convert XML to YAML?

olidev
- 20,058
- 51
- 133
- 197
9
votes
3 answers
HEIC to JPEG conversion with metadata
I'm trying to convert heic file in jpeg importing also all metadata (like gps info and other stuff), unfurtunately with the code below the conversion is ok but no metadata are stored on the jpeg file created.
Anyone can describe me what I need to…

Trics
- 189
- 1
- 8
9
votes
5 answers
Convert nested JSON to CSV file in Python
I know this question has been asked many times. I tried several solutions but I couldn't solve my problem.
I have a large nested JSON file (1.4GB) and I would like to make it flat and then convert it to a CSV file.
The JSON structure is like…

Porjaz
- 771
- 1
- 8
- 28
9
votes
4 answers
javax.validation.UnexpectedTypeException: HV000030: No validator could be found for type: java.lang.Integer
I have to take input for paper_name and date_of_birth as int and date datatype respectively from a form.
Below is the code:
Number:
< li>date of birth: …

Md Faisal
- 2,931
- 8
- 29
- 34
9
votes
9 answers
How to convert a Ternary expression to a Binary tree structure?
I came across this problem that has Ternary expression (a?b:c) and needs the ternary expression to be converted into a Binary tree structure.
a?b:c
a
/ \
b c
a?b?c:d:e
a
/ \
b e
/ \
c d
My approach…

aamir23
- 1,143
- 15
- 23
9
votes
5 answers
How can I convert an Integer (e.g 19000101 ) to java.util.Date?
Here's my code:
Integer value = 19000101;
How can I convert the above Integer represented in YYYYMMDD format to YYYY-MM-DD format in java.util.Date?

sbanerjee
- 169
- 1
- 3
- 8
9
votes
1 answer
Shapefile to raster conversion in R?
I have a shapefile downloaded from the worldwildlife.org for the terrestrial ecoregions of the world. The file can be loaded here: http://worldwildlife.org/publications/terrestrial-ecoregions-of-the-world.
It comes as a standard shape file and I…

I Del Toro
- 913
- 4
- 15
- 36