MATLAB Matlab: Convert Unusual Date Format to Readable Date

  • Thread starter Thread starter confused_engineer
  • Start date Start date
  • Tags Tags
    Format
Click For Summary
To convert a series of hour measurements since January 1, 1900, into proper dates using MATLAB, the key method involves adding the hour values to the base date. The formula provided indicates that you should convert the hour measurements into days by dividing by 24 and then use the `datenum` function to create a date from the origin. The resulting MATLAB code snippet is: `time = double(hours)/24 + datenum('1900-01-01 00:00:00');`. This approach effectively translates the hour counts into a recognizable date format.
confused_engineer
Messages
34
Reaction score
1
Hello everybody.
Recently I have been given a series of archives which contain a series of measurements and the dates in which they were measured. The problem is that this format is the time which has happened in hours since 1900-01-01 at midnight. Can someone tell me how can I find out how to find the proper date using Matlab.

The times are
1022676
1022682
1022688
1022694
1022700
1022706
1022712
1022718
1022724

Thanks for the help
 
Physics news on Phys.org
You need to add those hours to the origin date, something like
Matlab:
time = double(hours)/24 + datenum('1900-01-01 00:00:00');
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 16 ·
Replies
16
Views
14K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
25K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K