Skip to Content
author's profile photo Former Member
Former Member

.Net Connector and DateTime Fields

Why the RfcField of type RFCTYPE_DATE aren't converted to .Net DateTime (but to string)? Is it possible to instruct the .Net Connector proxy generator to follow the RFC types?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 19, 2005 at 07:22 AM

    I don't exactly remember what the reason for the design desision was to keep RFC_DATE as string. Maybe conversion to DateTime was considered to be too slow, especially if you pass dates between proxy functions (which would create unesseray conversion to and from DateTime).

    Anyway, there is are nice conversion functions available in (static) class "RfcConvert":

    RfcDateToDateTime: Converts a RFC_DATE type to a .NET DateTime

    DateTimeToRfcDate: Converts a .NET DateTime type to RFC_DATE type

    RfcTimeToTimeSpan: Converts RFC_TIME type to .NET TimeSpan type

    TimeSpanToRfcTime: Converts .NET TimeSpan type to RFC_TIME type

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.