NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 24 25 26 27 28 … 93 Next »
datetime format in GB-PVR

 
  • 0 Vote(s) - 0 Average
datetime format in GB-PVR
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#11
2009-03-16, 07:04 PM
you'd be better to:
Code:
SQLParameter newParm = command.Parameters.Add(item_id)
newParm.DbType = System.Data.DbType.DateTime

or

Code:
SQLParameter newParm = new SQLParameter
newParm.DbType = System.Data.DbType.DateTime
newParm.Name = "name"
command.Parameters.Add(newParm)
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#12
2009-03-16, 08:35 PM
psycik Wrote:you'd be better to:
Code:
SQLParameter newParm = command.Parameters.Add(item_id)
newParm.DbType = System.Data.DbType.DateTime

or

Code:
SQLParameter newParm = new SQLParameter
newParm.DbType = System.Data.DbType.DateTime
newParm.Name = "name"
command.Parameters.Add(newParm)

OK. I think I have this in the code correctly now.

By problem now is to recover some messed up records. The data is there, just the format of the date string is wrong.

I want to pull the date string out (as is?) and then reformat it and put it back...

manual_start_time (and end time) is
Code:
2009-03-26 10:00:00 PM

I'm not sure of the date formatting is occurring.

It's really a one time thing as I'm trying to recover some shows in my database.

For VB, I had to do this

Code:
SQLparm = New SQLiteParameter
            SQLparm.DbType = System.Data.DbType.DateTime
            SQLparm.ParameterName = "@manual_start_time"
            SQLparm.Value = .manual_start_time
            command.Parameters.Add(SQLparm)

            SQLparm = New SQLiteParameter
            SQLparm.DbType = System.Data.DbType.DateTime
            SQLparm.ParameterName = "@manual_end_time"
            SQLparm.Value = .manual_end_time
            command.Parameters.Add(SQLparm)
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#13
2009-03-16, 08:54 PM
you may have to go through the db and edit them by hand?? how else will your program know what format they are/need to be if you've entered them in wrong?
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#14
2009-03-16, 10:21 PM
psycik Wrote:you may have to go through the db and edit them by hand?? how else will your program know what format they are/need to be if you've entered them in wrong?

Actually, I thought a date is a date.

It's a perfectly vaild date, just GB-PVR doesn't like it. Sure I put it there like it was a string, but isn't that what the sqli3 typing is all about, it shouldn't have let me?
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#15
2009-03-17, 04:12 AM
sub Wrote:Sorry, I know nothing about VB.Net syntax. I'm sure googling "VB.NET Prepared Statements" will return some examples.

Thanks. I think this might be what I'm looking for.

I'm going to have to rest my brain though...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  How Does "Use S01E01 File naming format if possible" work puck64 7 5,277 2015-08-25, 10:21 AM
Last Post: puck64
  EPG_EVENT.genres format bgowland 2 2,253 2014-08-10, 05:49 AM
Last Post: bgowland
  N-PVR db3 EPG_EVENT time format question bgowland 3 2,060 2011-03-12, 05:26 AM
Last Post: bgowland
  Access DB and DateTime idkpmiller 5 2,306 2008-04-14, 10:37 AM
Last Post: idkpmiller
  What format to post a plugin? McBainUK 5 2,162 2005-10-28, 12:31 AM
Last Post: sub
  Error: input string was not in a correct format sisuomin 6 3,076 2004-05-11, 08:56 PM
Last Post: Dai

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode