0

我正在尝试使用 FileHelps 导入 csv。导入时我需要日期为 mmddyyyy 格式,但默认为 ddmmyyyy。我看到你在 c# 中使用的位置

[FieldConverter(ConverterKind.Date, "MMddyyyy" )] 
Public Property BeginningDate as datetime

但是,这在 vb.net 中不起作用,我尝试过的转换器也无济于事。希望有人能告诉我如何隐藏它。谢谢香农

4

1 回答 1

1

找到了答案。

 <FieldConverter(ConverterKind.Date, "MMddyyyy")> _
    Public mBeginningDate As DateTime

    Public Property BeginningDate As DateTime
        Get
            Return mBeginningDate
        End Get
        Set(pValue As DateTime)
            mBeginningDate = pValue
        End Set
    End Property

谢谢香农

于 2012-11-08T14:05:49.470 回答