Sqlite MultiDate?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Sqlite MultiDate?
Dummy1912
Hello,

i like to show the start date till end date
but it only shows all from 10/1/2017 and 10/12/2017 and not between it :(
i like to show from 10/1/2017 till end 10/12/2017
so also everything between /1/ till end /12/
Code: Select all
Dim whereClause As String = "transactions.setdate BETWEEN '10/1/2017' AND '10/12/2017'"

  Dim tblFields As SQLiteDataReader = DataBase.executeQuery("SELECT " & attributes & " FROM transactions " & fromClause & " WHERE " & whereClause & ";")
Thanks :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Sqlite MultiDate?
Dummy1912
Wellllll
it even seems when you have the wrong date display in your own db
you can't even show it properly

so my db has now yyyy-MM-dd and still don't show all my data
it only shows from the date i added in the between

so it only show the dates from 2017-10-01 and 2017-10-12
why not all till 2017-10-12 ?

Anyone please
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Re: Sqlite MultiDate?
CodenStuff
Rough but have you tried it like:
Code: Select all
  Dim tblFields As SQLiteDataReader = DataBase.executeQuery("SELECT " & attributes & " FROM transactions " & fromClause & " WHERE date BETWEEN" & "10/1/2017" &  " AND " &  "10/12/2017" &" ;")

Formula should work like:
Code: Select all
"SELECT thisdata FROM yourtable WHERE date BETWEEN "2017-10-1" AND "2017-10-12";"
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Sqlite MultiDate?
Dummy1912
Hi Codenstuff,

Problem solved :D

it has with my db i had to set all my dates to yyyy-MM-dd and then search for 2017-10-01 and 2017-10-12 and works like a charm :)

Thanks
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
4 posts Page 1 of 1
Return to “Coding Help & Support”