forked from RichardOtter/RootsMagic_Database_Design
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUTCModDate.txt
More file actions
37 lines (25 loc) · 1.06 KB
/
UTCModDate.txt
File metadata and controls
37 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
https://answers.microsoft.com/en-us/msoffice/forum/all/julian-date/7d23f252-272a-4e52-802e-ec3f3e616845
Microsoft uses days since Dec20 1899.
Julian date is from
offset start point name
0 noon January 1, 4713 BC Original Julian Date. No controversy.
2400000.5 midnight Nov. 17 1858 more standard Modified JD offset
2415018.5 midnight Dec. 30, 1899 Microsoft MJD offset
2430000.0 midnight Jan. 5, 1941 some astrophysicists use this
https://stackoverflow.com/questions/5248827/convert-datetime-to-julian-date-in-c-sharp-tooadate-safe
SQLite docs
https://www.sqlite.org/lang_datefunc.html
using SQLite-
``` SQL
-- to generate current UTCModDate
SELECT julianday('now') - 2415018.5 AS UTCModDate
-- to convert UTCModDate to standard format date/time
SELECT UTCModDate,
DATE(UTCModDate + 2415018.5) AS Date,
TIME(UTCModDate + 2415018.5) AS Time,
DATETIME(UTCModDate + 2415018.5) AS DateTime
FROM EventTable
To save UTCModDate to current time in RM database
UPDATE EventTable
SET UTCModDate = julianday('now') - 2415018.5
```