1 Replies - 358 Views - Last Post: 05 April 2016 - 09:35 AM Rate Topic: -----

#1 PixelPaul   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-February 16

Converting user input to DateTime in database

Posted 05 April 2016 - 09:32 AM

I have a user input for 'Event Date', which accepts user input in the form of 04/05/2016. I want to save this value to a column in a T-SQL database, with a DateTime format. So I can then run queries against the table like: EventDate > GetDate(). My objects 'EventDate' field is of type DateTime and the SQL column is DateTime also. Is there any data transformation that needs to take place in order to save this to the database?
Is This A Good Question/Topic? 0
  • +

Replies To: Converting user input to DateTime in database

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14406
  • View blog
  • Posts: 57,763
  • Joined: 12-June 08

Re: Converting user input to DateTime in database

Posted 05 April 2016 - 09:35 AM

Have you tried it?

Make sure to use parameters.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1