It looks as if you have an odd value in there for the hour. Do you?
Charlotte Wood, MEd Educator (405) 578-5701 Zoom Meeting ID#: 4055785701 *Zoom URL:* https://epiccharterschools.zoom.us/j/2970513912 Classroom Google Site: https://sites.google.com/epiccharterschools.org/charlottewoodclassroom/home Epic Technical Support: (405) 652-0935 Jordan McKesson Principal 405-749-4550 ext. 309 jordan.mckes...@epiccharterschools.org <http://facebook.com/epiccharterschools> <https://twitter.com/epiccharter> <https://www.instagram.com/epiccharterschools/> <https://www.youtube.com/user/EpicCharterSchools> On Wed, Jul 3, 2019 at 6:52 PM John Burke <jwbu...@gmail.com> wrote: > Trying to connect to SQL Server from Django > > DATABASES = { > 'default': { > 'ENGINE': 'sql_server.pyodbc', > 'NAME': 'dbname', > 'HOST': 'hostname', > 'PORT': '', > 'USER': 'user', > 'PASSWORD': 'password', > 'OPTIONS': { > 'driver': 'ODBC Driver 13 for SQL Server', > }, > } > } > > > I get the following error: > File "...\venv\lib\site-packages\sql_server\pyodbc\base.py", line 362, in > init_connection_state > val = cursor.execute('SELECT SYSDATETIME()').fetchone()[0] > ValueError: hour must be in 0..23 > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/58c14df7-0b4e-49dd-a19e-11c1101ff947%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/58c14df7-0b4e-49dd-a19e-11c1101ff947%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPZR0N6yPmqDRwfbSXNwUHOCR3%3DDcgTM_Ez_DcM7FbxjAsSFGA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.