2012-11-08 57 views
0

我正在尝试使用FileHelps导入csv。导入时需要使用mmddyyyy格式的日期,但默认格式为ddmmyyyy。我看你在哪里使用C#filehelps导入日期时间

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

然而,这并不工作在vb.net和我试过的转换器也没有帮助。希望有人能告诉我如何去隐瞒那个。 谢谢 shannon

回答

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 

感谢 香