1

I'm trying to format a date in Google Dart but cannot seem to come up with the appropriate string to match what should be in a url to pass parameters in. I'm inputting the date from an HTML control. I tried looking at this post but didn't have much success: How do I format a date with Dart? ; Please let me know if you need more information.

HTML:

Start Date: <input type="date" id="start" name="start">

Dart:

String query="?afterTime="+startDate.valueAsDate+"&beforeTime="+endDate.valueAsDate;

The date comes out as:

2014-07-16 00:00:00.000Z

and I need something like this formatting:

2014-05-28+0%3A00%3A00

and/or

2014-05-28+0%3A00%3A00
Community
  • 1
  • 1
user3757992
  • 159
  • 7
  • I think you need something like http://stackoverflow.com/questions/10247073/urlencoding-in-dart Please add a comment whether this is what you are looking for. – Günter Zöchbauer Jul 17 '14 at 18:08

0 Answers0