473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert a string containing a 32-bit binary date to a date data type

Hi,

I took over an Visual Object project (Visual Clipper) in that language there
is a function to: Convert a string containing a 32-bit binary date to a date
data type. That function is called bin2Date and there also is a Date2bin
function of course in cannot find how to do this in csharp. The string looks
like this "!$%\0" and should return 03/09/52 can somebody point me in the
right direction? Have tried Convert class in several ways but without any
luck.

Kind regards,

--
Remi Caron
Nov 16 '05 #1
2 2820
Hi,

You have to know how clipper keeps its data format, probably some sort of
ticks counts from somewhere in time, without this there is nothing you can
do.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Remi Caron" <Re********@sdgn.nl> wrote in message
news:eC**************@TK2MSFTNGP15.phx.gbl...
Hi,

I took over an Visual Object project (Visual Clipper) in that language there is a function to: Convert a string containing a 32-bit binary date to a date data type. That function is called bin2Date and there also is a Date2bin
function of course in cannot find how to do this in csharp. The string looks like this "!$%\0" and should return 03/09/52 can somebody point me in the
right direction? Have tried Convert class in several ways but without any
luck.

Kind regards,

--
Remi Caron

Nov 16 '05 #2
Assuming access to clipper just call it's bin2Date for zero. That should
give the zero date. You can get the tick value by using Date2Bin on two
dates a day apart and see how much the binary values change by.

-- Kevin

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:O0**************@TK2MSFTNGP09.phx.gbl...
Hi,

You have to know how clipper keeps its data format, probably some sort of
ticks counts from somewhere in time, without this there is nothing you can
do.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Remi Caron" <Re********@sdgn.nl> wrote in message
news:eC**************@TK2MSFTNGP15.phx.gbl...
Hi,

I took over an Visual Object project (Visual Clipper) in that language

there
is a function to: Convert a string containing a 32-bit binary date to a

date
data type. That function is called bin2Date and there also is a Date2bin
function of course in cannot find how to do this in csharp. The string

looks
like this "!$%\0" and should return 03/09/52 can somebody point me in the right direction? Have tried Convert class in several ways but without any luck.

Kind regards,

--
Remi Caron


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: paul gao via .NET 247 | last post by:
hi all. In my program I need to convert a double number to stringrepresentation in fraction format and vise versa. For example,convert 0.75 to string "3/4" and convert string "1/2" to 0.5.The class...
15
by: Tanzim Saqib | last post by:
I've been trying to learn VB.NET. I know VB6. I can not convert the following VB6 code segment to VB.NET In VB 6: ' In a module starts here: Public Declare Function SetTimer Lib "user32"...
10
by: asimrafi | last post by:
Hi! i m new to this forum and need some help in ASP how can i validate a string so that it have only the characters of ASCII 32 to 91 and 93 to 122 ? Also if the string contains the comma (,)...
5
by: sjsn | last post by:
Basic C++, just started this course in school... So I'm very limited. What I'm at doing is, below I have a variable named inputTemp, which is the product of a char, F = Fahrenheit, C = Celsius...
3
by: =?Utf-8?B?U2hlbGRvbg==?= | last post by:
Hello - I have various times formatted like 00:00:00, so for example, 01:32:05 would be one thirty-two with five milliseconds. I need to convert this into seconds (an integer). First of...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.