Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Dim mylist = (From el in Element Select el).ToList()
  2. .Select(function(el) new with {
  3. .bday = el.birthday.toString("dd/MM/yy")
  4. }
  5.  
  6. .bday = el.birthday.toString("dd/MM/yy")
  7.  
  8. .bday = CDate(el.birthday).toString("dd/MM/yy")
  9.  
  10. Dim normalDate As Date = Now
  11. Dim nullableDate As Nullable(Of Date) = normalDate
  12.  
  13. Dim normalToText As String = normalDate.ToString("dd/MM/yy") 'Works perfectly
  14.  
  15. Dim nullableToText As String = nullableDate.ToString("dd/MM/yy") 'Error
  16.  
  17. .bday = el.birthday.value.toString("dd/MM/yy")
  18.  
  19. If el.birthday.HasValue Then
  20. .bday = el.birthday.toString("dd/MM/yy")
  21. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement