Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon 47 posts 290 karma points
    Aug 27, 2018 @ 10:46
    Jon
    0

    Date error when sending form mail

    Something goes wrong with this line in the sending form template. I have no idea how to solve it ... anyone? THX :-)

     case "FieldType.DatePicker.cshtml":
    <p style="margin-top:0;">
    @(Convert.ToDateTime(field.GetValue()).ToString("f"))
    </p>
    break;
    
  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Aug 28, 2018 @ 10:13
    Alex Skrypnyk
    0

    Hi Jon

    What type of error?

    Alex

  • Nicholas Wright 24 posts 144 karma points notactivated
    Jul 31, 2019 @ 09:12
    Nicholas Wright
    0

    I suspect its null in the date field, did you manage to fix it ?

    you need to check its value, then only do the convert to datetime - if its not null

    Regards

Please Sign in or register to post replies

Write your reply to:

Draft