codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Converting 8 byte hex value to datetime value  Jude_Aj at 12:33 on Tuesday, March 17, 2009
 

Hi,
i am reading an .mdf file (sql server 2000 file) in raw format.
i have a value a datetime value of "f913e300 939b0000"(big endian) which represents value "Jan 16 2009 1:46PM".I had used Coledatetime class to convert this hex value to date time.Its giving me the right date but the time is incorrect.Here is what i tried to do.

int date_part = "1st 4 bytes of 8 byte date time value";//0x00009b93
int time_part = "next 4 bytes of 8 byte date time value"//0x00e313f9/1000

COleDateTime startOnDate(1900, 1, 1, 0, 0, 0);

startOnDate += COleDateTimeSpan(date_part, 0, 0, time_part);

CString buffer = startOnDate.Format();



I'm i going wrong somewhere.Is there any alternate way of doing this?
Any help would be appreciated.
Thanks


  Re: Converting 8 byte hex value to datetime value  dabora100 at 09:37 on Saturday, April 02, 2011
 


Every day, or so it seems, new research shows that some aspect of lifestyle - physical activity, diet, alcohol consumption, and so on - affects health and longevity. Physical fitness is good bodily health, and is the result of regular exercise, proper diet and nutrition, and proper rest for physical recovery. The field of nutrition also studies foods and dietary supplements that improve performance, promote health, and cure or prevent disease, such as fibrous foods to reduce the risk of colon cancer, or supplements with vitamin C to strengthen teeth and gums and to improve the immune system. When exercising, it becomes even more important to have a good diet to ensure that the body has the correct ratio of macronutrients whilst providing ample micronutrients; this is to aid the body in the recovery process following strenuous exercise.
__________________________________________________________


Pass4sure JN0-522| Pass4sure A00-270| Pass4sure PMI-002| Pass4sure 1z0-055| Pass4sure 1z0-047| Pass4sure 1z0-043| Pass4sure 1z0-040| Pass4sure CISM| Pass4sure LOT-959| Pass4sure LOT-832









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Converting 8 byte hex value to datetime value
•  Re: substitute of goto in java???
•  Re: How to make href enabled and disabled???
•  Re: Testing if object exists in IE
•  Re: Help! Z-index problem with iframe and dropdown menu
•  Re: checkbox verification..headache!!
•  Re: drop down tool tip
•  Re: My asp page changes my website links, what can I do?
•  Re: Web design


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2011