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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -