[tw] Re: Date confusion

2011-12-15 Thread Eric Shulman
 var when=new Date().formatString('0MM0DD-0hh:0mm:0ss');
...
 store.saveTiddler(title,title,text,who,when,etiquetas,null);
...
 TypeError: b.convertToMMDDHHMM is not a function
 Why is this happeningwhy doesnt my date format work in my code??

The 'when' variable you define is a date, **formatted as text**.  But
the saveTiddler() function expects a Date **object**.  Try these
changes:


var now=new Date()
var when=now.formatString('0MM0DD-0hh:0mm:0ss');
...
store.saveTiddler(title,title,text,who,now,etiquetas,null);


enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios


TiddlyTools needs YOUR financial support...
Help ME to continue to help YOU...
make a generous donation today:
   http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Date confusion

2011-12-15 Thread skye riquelme
Thanks...that works, although not sure why. I can see that var now is
a dateas store.saveTiddler expects..but why is var now
formatted into the right format, when the code formated var now as var
when. seems to me the formated date is in when,not now!!!

Anyway, back on the road...now just have to get it to write the note
to mysqland then later have php build the sorted notes into a
text, stored into pureStore format Phew!!!

Thanks
Skye


On 15 dez, 17:12, Eric Shulman elsdes...@gmail.com wrote:
  var when=new Date().formatString('0MM0DD-0hh:0mm:0ss');
 ...
  store.saveTiddler(title,title,text,who,when,etiquetas,null);
 ...
  TypeError: b.convertToMMDDHHMM is not a function
  Why is this happeningwhy doesnt my date format work in my code??

 The 'when' variable you define is a date, **formatted as text**.  But
 the saveTiddler() function expects a Date **object**.  Try these
 changes:

 
 var now=new Date()
 var when=now.formatString('0MM0DD-0hh:0mm:0ss');
 ...
 store.saveTiddler(title,title,text,who,now,etiquetas,null);
 

 enjoy,
 -e
 Eric Shulman
 TiddlyTools / ELS Design Studios

 
 TiddlyTools needs YOUR financial support...
 Help ME to continue to help YOU...
 make a generous donation today:
    http://www.TiddlyTools.com/#Donations

 Professional TiddlyWiki Consulting Services...
 Analysis, Design, and Custom Solutions:
    http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.