Friday 13 April 2018

ASN.1: DATE-TIME: Represent date and time together

Type: DATE-TIME

Description: It is used to represent date and time together. "YYYY-MM-DDTHH:MM:SS"      

Example
startTime "2018-02-06T06:30:23"

Example Schema
Event ::= SEQUENCE {
    eventName VisibleString,
    startTime DATE-TIME,
    endTime DATE-TIME
}

Sample data for above schema
eventOne Event ::= {
 eventName "Under 19 Tennis",
 startTime "2018-02-06T06:30:23",
 endTime "2018-02-23T18:30:23"
}

XML encoding of above data
<?xml version="1.0" encoding="UTF-8"?>
<Event>
  <eventName>Under 19 Tennis</eventName>
  <startTime>2018-02-06T06:30:23</startTime>
  <endTime>2018-02-23T18:30:23</endTime>
</Event>



Previous                                                 Next                                                 Home

No comments:

Post a Comment