Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Converting date to ticks value

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-22-2008, 10:25 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 159
Default Converting date to ticks value

Hi,

I convert a date value (from database) to ticks value and assign to a variable.
I can see the date in the table use in the "cmd.ExecuteTable" statement, but the variable shows zero (0) value after conversion. the code is like :

cmd.CommandText="select dob from member where perm_pid= "&tt&""
cmd.ExecuteTable("table12",0)
mm=DateParse(table12.Cell("dob",0))
Msgbox("dob :"&mm) ; shows dob : 0

Please correct me.


regards,
Reply With Quote
  #2 (permalink)  
Old 10-22-2008, 10:32 AM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

i'm think in your table you use another dateformat.
what is table12.Cell("dob",0) it?
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #3 (permalink)  
Old 10-22-2008, 10:36 AM
Senior Member
 
Join Date: Sep 2008
Location: Brisbane, Australia
Posts: 162
Default try looking at the format

what DateFormat are you using?

I store my dates in SQLite as yyyy-mm-dd

so in my program I use DateFormat("yyyy-mm-dd")

what formats are your dates showing in the table?

eg mine are 2008-10-21 which is 21 October 2008

match the DateFormat with what your table shows

hope this makes sense.

regards, Ricky
Reply With Quote
  #4 (permalink)  
Old 10-22-2008, 10:51 AM
Senior Member
 
Join Date: Mar 2008
Location: Dhaka, Bangladesh
Posts: 159
Default

Hi Byak@ and Ricky D,

Thanks for your time. It work now like:

dateformat("dd/mm/yyyy")
cmd.CommandText="select dob from member where perm_pid= "&tt&""
cmd.ExecuteTable("table12",0)
mm=DateParse(table12.Cell("dob",0))
Msgbox("dob :"&mm) ; shows dob : 0


Best regards,
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed converting a VB6 Project Drewpeu Questions (Windows Mobile) 11 10-15-2008 07:13 PM
Ticks as a floating point value on XP (not 2000) lancaster Questions (Windows Mobile) 4 04-09-2008 11:38 AM
Ticks truncated on the device? willisgt Questions (Windows Mobile) 1 12-11-2007 06:29 PM
Ticks, 1000000 in a second? colin9876 Bug Reports 6 12-09-2007 02:40 PM
Problem Converting CSV to SQLite tcgoh Questions (Windows Mobile) 5 11-01-2007 03:50 AM


All times are GMT. The time now is 03:25 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0