Top "Type-conversion" questions

Type conversion is the way of implicitly or explicitly changing an entity of one data type into another.

Can I convert long to int?

I want to convert long to int. If the value of long > int.MaxValue, I am happy to let …

c# types int type-conversion long-integer
Conversion from Long to Double in Java

Is there any way to convert a Long data type to Double or double? For example, I need to convert 15552451…

java type-conversion
How to convert string to float?

#include<stdio.h> #include<string.h> int main() { char s[100] ="4.0800" ; printf("float value : %4.8f\n" ,(float) …

c floating-point type-conversion atof strtod
Convert Float to Int in Swift

I want to convert a Float to an Int in Swift. Basic casting like this does not work because these …

swift casting type-conversion
How do I convert Long to byte[] and back in java

How do I convert a long to a byte[] and back in Java? I'm trying convert a long to a …

java type-conversion byte long-integer
Convert bytes to int?

I'm currently working on an encryption/decryption program and I need to be able to convert bytes to an integer. …

python python-3.x int type-conversion byte
How to convert Nvarchar column to INT

I have a nvarchar column in one of my tables. Now I need to convert that column values to INT …

sql-server sqldatatypes type-conversion
How can I convert a char to int in Java?

(I'm new at Java programming) I have for example: char x = '9'; and I need to get the number …

java char type-conversion int
How can I convert a string with dot and comma into a float in Python

How can I convert a string like 123,456.908 to float 123456.908 in Python?

python type-conversion
Why is datetime.strptime not working in this simple example?

I'm using strptime to convert a date string into a datetime. According to the linked page, formatting like this should …

python string datetime type-conversion datetime-format