I have a software that save's datetime into an integer field. For example:
21 Fev 2007 09:45:07 --> 745083669
21 Fev 2007 10:19:39 --> 745182735
22 Fev 2007 10:08:14 --> 745185806
22 Fev 2007 10:08:17 --> 745185809
I like to know how to convert interger field to datetime type.
Any help will be greatly appreciated, thanks in advance
4 11148
It seems that the program is using a reference date, and return the difference between a second date and reference date in seconds.
Compare the result of this query against your values: -
SELECT DATEADD(ss, 745083669, '07/13/1983 18:03:58')
-
, DATEADD(ss, 745182735, '07/12/1983 15:07:24')
-
, DATEADD(ss, 745185806, '07/13/1983 14:04:48')
-
, DATEADD(ss, 745185809, '07/13/1983 14:04:48')
-
Integer values don't look like datetime values, at least using standard transformation logic. Standard transformation logic is to store the number of units (seconds/minutes/hours/whatever) between particular datetime value and required one, and it can be easily determined by searching for proportion between datetime and integer values, but your sample doesn't have it.
Tanks for your help.
But i need to find out what datetime i will use to add the seconds.
Do you have a clue to do that?
HELP MEEEEE...
It seems that the program is using a reference date, and return the difference between a second date and reference date in seconds.
Compare the result of this query against your values: -
SELECT DATEADD(ss, 745083669, '07/13/1983 18:03:58')
-
, DATEADD(ss, 745182735, '07/12/1983 15:07:24')
-
, DATEADD(ss, 745185806, '07/13/1983 14:04:48')
-
, DATEADD(ss, 745185809, '07/13/1983 14:04:48')
-
It seems that your values are based on 3 different reference dates, so it is not fixed:
07/13/1983 18:03:58
07/12/1983 15:07:24
07/13/1983 14:04:48
07/13/1983 14:04:48
You should better analyze that program or contact the author in order to provide out the algorithm that generates the reference dates.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ste |
last post by:
Hi,
I have a dump with a table with this field:
"hdstart" integer
which contains integer like 1042758000 1028152800 etc etc
How can I convert it to a SQL Server DateTime field?
Thank in...
|
by: Lauren Quantrell |
last post by:
I have a stored procedure using Convert where the exact same Convert
string works in the SELECT portion of the procedure but fails in the
WHERE portion.
The entire SP is listed below....
|
by: Logan X via .NET 247 |
last post by:
It's official....Convert blows.
I ran a number of tests converting a double to an integer usingboth Convert & CType. I *ASSUMED* that CType would piggy-back ontop of Convert, and that performance...
|
by: v0lcan0 |
last post by:
I’m trying to cast and integer type to a varchar and then concatenate
two varchar and ’01’ and convert it into datetime with the following
code:
CONVERT(datetime, { fn CONCAT({ fn...
|
by: Chris |
last post by:
Hello,
How can i convert a C++ CTime (4 bytes) into a C# DateTime ?
(my CTime is read in a file).
Thanks,
--
Chris
|
by: Learner |
last post by:
Hello,
Here is the code snippet I got strucked at.
I am unable to convert the below line of code to its equavalent vb.net
code. could some one please help me with this?
static public...
|
by: Terry Jolly |
last post by:
New to C# ---- How do I convert a Date to int?
In VB6:
Dim lDate as long
lDate = CLng(Date)
In C#
|
by: =?Utf-8?B?U2hlbGRvbg==?= |
last post by:
Hello -
I have about ten integer values that each need to be converted to days,
hours, minutes and seconds. I can't seem to find a formula for same that
works. These integer values come from a...
|
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...
|
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...
|
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
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |