GenoPro Home
|
Get Started With My Genealogy Tree
|
Buy
|
Login
|
Privacy
|
Search
|
Site Map
GenoPro Support Forum
Home
Search
Tags
Who's On
Welcome Guest
(
Login
|
Register
)
Recent Posts
Popular Topics
Home
»
GenoPro
»
Report Generator
»
Parsing Year month and day from date?
Parsing Year month and day from date?
Rate Topic
Topic View
Topic Options
Author
How do you reliably retrieve the year month and day from a date in the report writer?
Tom Malia
Posted Saturday, January 12, 2008
-
Post #20393
Junior Member
Customers
Gamma
GenoPro version: 3.1.0.1
Last Login: Thursday, February 11, 2021
Posts: 14,
Visits: 52
Take the
Birth
.Date property of the as an example.
These properties do not necessarily hold a "date" since they can hold either a complete date (i.e. a month day and
year
) or a partial date (i.e. a month and a year or a month and a day).
Given this fact, how would I go
about
"parsing" the Birth.Date property of an
individual
to try to retrieve the separate values of the Month, day and year?
So far, my testing seems to indicate first that the property returns data in the DD/MM/YYYY format when it's a full date. Is this always the case or is the format based on the user's
localization
settings?
It further appears that there are for possibilities as to what might be in a "date" field of this type:
1) DD/MM/YYYY
2) DD/MM
3) DD/YYYY
4) YYYY
Is this accurate?
If this is true, then, can I assume that years and only years will always be 4 digits long?
If all this is true, then would it be safe to say that:
1) if there's only one "part" of a date present then it must be a year.
2) If there are two "parts" of the a date present and the second "part" is a two digit number then it will ways represent a month but if it is a four digit number then it will always be a year
If there's an easier way to figure all this out I'd love to hear it. If there isn't an easier way, then is there anything wrong in my logic?
Tom Malia
"a society that draws a broad line between it's military and it's intellectuals has it's wars fought by idiots and it's thinking done by cowards" (paraphrased from a source that I no longer remember)
Threaded View
Threaded View
Parsing Year month and day from date?
By
Tom Malia
(
Saturday, January 12, 2008
)
The GenoPro [url=http://www.genopro.com/sdk/Class/GenoDate/]Date...
By
genome
(
Saturday, January 12, 2008
)
Perfect! Thanks!
By
Tom Malia
(
Sunday, January 13, 2008
)
There is also an [c]Approximation[/c] property, that I don't think is...
By
genome
(
Sunday, January 13, 2008
)
Similar Topics
Reading This Topic
Powered By InstantForum.NET 2010-3-x © 2025
Execution: 0.000.
3 queries.
Compression Enabled.
Search All Forums...
GO
Advanced Search
Rate Topic
Great
Good
Average
Bad
Poor
Rate This Topic
Flat Ascending
Flat Descending
Threaded
Subscribe To Topic
Print This Topic
Goto Topics Forum