c# - what datatype to use to store "MMYYYY" format -


i using .net environment , wanted track expiration date found in credit cards. date there of nature "mmyyyy". recommended way store ? should use .net string or instead use .net datetime object ?

in cases easiest solution best solution. easy maintain, easy other programmers recognize, , may keep out of trouble (ints , strings can lead localization problems , invalid values).

a system.datetime best option , gives flexibility cards may expire on given day (they rare, exist, , may become more prevalent temporary credit cards becoming popular). when storing value use date property of system.datetime struct since disregard time components.


Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

java - Why is BlockingQueue.take() not releasing the thread? -

jQuery Ajax Render Fragments OR Whole Page -