Search Results

Search found 12421 results on 497 pages for 'date arithmetic'.

Page 40/497 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • DateTime to javascript date

    - by AJ
    Hello, From another answer on Stackoverflow is a conversion from Javascript date to .net DateTime: long msSinceEpoch = 1260402952906; // Value from Date.getTime() in JavaScript return new DateTime(1970, 1, 1) + new TimeSpan(msSinceEpoch * 10000); But how to do the reverse? DateTime to Javascript Date ? Thanks, AJ

    Read the article

  • Get directory contents in date modified order

    - by nevan
    Is there an method to get the contents of a folder in a particular order? I'd like an array of file attribute dictionaries (or just file names) ordered by date modified. Right now, I'm doing it this way: get an array with the file names get the attributes of each file store the file's path and modified date in a dictionary with the date as a key Next I have to output the dictionary in date order, but I wondered if there's an easier way? If not, is there a code snippet somewhere which will do this for me? Thanks.

    Read the article

  • Flash date and time and coutdown timer

    - by c11ada
    hey all, does any one know of any good countdown timer's for flash which i can use to be implemented in a flash game or quiz ? also i have the following line of code var endDate:Date = new Date(2010,7,30); how would i go about having the endDate to be the current time and date + 30 minutes ? thanks

    Read the article

  • How to convert String to Java.sql.date and Java.sql.time

    - by Mr Morgan
    Hello If I have a method like this: public static String convertDateTimeToString(DateTime dt) { return dt.getDate() + " " + dt.getTime(); } Which takes a Datetime object of my own which contains a Java.sql.date and a Java.sql.time, what is the best way of reversing the process so that I can substring a Java.sql.date and a Java.sql.time from a string? Or if DateTime dt is a JodaTime DateTime object? If this can be done without reference to Java.util.date. Thanks Mr Morgan.

    Read the article

  • Yet another date formatting problem :(

    - by Jonesy
    Hi folks, I seem to have a date formatting problem every day! I am querying a table and am getting a date back in the format dd/mm/yyyy (as a string btw). Brilliant! thats what I want. But, now I want to convert that string to a date so i can do dim dayNumber as integer = day.DayOfWeek But when I convert it to a date it changes it to #m/dd/yyyy#. AHHHH! how can I change this? Cheers

    Read the article

  • MySQL ORDER BY date and team

    - by Michael
    I would like to order by date and then team in a MySQL query. It should be something similar to this: SELECT * FROM games ORDER BY gamedate ASC, team_id AND it should output something like this: 2010-04-12 10:20 Game 1 Team 1 2010-04-12 11:00 Game 3 Team 1 2010-04-12 10:30 Game 2 Team 2 2010-04-14 10:00 Game 4 Team 1 So that Team 1 is under each other on the same date, but separate on a new date

    Read the article

  • Php date() giving the wrong time after parsing

    - by Kirill
    This is confusing as hell, here's the php I'm using: <?php echo date('H:i D j, F',$j->date); ?> This is what it gives me: 01:33 Thu 1, January Which seems fine, until you look at the actual time that is being given ($j-date provides): 2010-06-12 21:12:23 Why is it giving me a January and what am I doing wrong?

    Read the article

  • JSTL - Format date

    - by John Manak
    Hi! I have a loop that goes through all the news items we have on our site. One of the fields is date ${newsitem.value['Date']}, given in millliseconds. I'd like to display this date in month/day/year format on the webpage. I thought JSTL format tag, <fmt:formatDate>, would help, but I haven't succeeded. Do you know how to do it? <cms:contentaccess var="newsitem" /> <h2><c:out value="${newsitem.value['Title']}" /></h2> // display date here <c:out value="${newsitem.value['Text']}" escapeXml="false" />

    Read the article

  • What is the best way to format a date in JSON for Mongo DB storage

    - by Poul
    I have a date with a time. I'm using ruby, but the language shouldn't matter. d = "2010-04-01 13:00:00" What is the best way to format this date for Mongo DB? By 'best' I mean, is there a certain format I could use where Mongo would recognize it as a date and might give me more-advanced filtering optons? ie: If formatted correctly, could I ask Mongo to return all records whose month is '04'? Thanks!

    Read the article

  • Mysql : Count Posts and Group by date

    - by Oguz
    Hello , I am not very good at sql , generally I use php to do my complicated tasks , But in this task , there are lots of data , so using php for counting posts is very slow. So I want a sql which counts post by date , but my date column in table is php's time stamp.I will crate post number x date chart

    Read the article

  • Extracting text from a file where date -time is the index

    - by Soham
    I have got around 800 files of maximum 55KB-100KB each where the data is in this format Date/Time/Float1/Float2/Float3/Float4/Integer Date is in DD/MM/YYYY format and Time is in the format of HH:MM Here the date ranges from say 1st May to 1June and each day, the Time varies from 09:00 to 15:30. I want to run a program so that, for each file, it extracts the data pertaining to a particular given date and writes to a file. I will not face any problem in writing into directory operations. I am trying to get around, to form a to do a search and extract operation. I dont know, how to do it, would like to have some idea. Thanks Soham

    Read the article

  • Rails 3.1 text_field form helper and jQuery datepicker date format

    - by DanyW
    I have a form field in my Rails view like this: <%= f.text_field :date, :class => "datepicker" %> A javascript function converts all input fields of that class to a jQueryUI datepicker. $(".datepicker").datepicker({ dateFormat : "dd MM yy", buttonImageOnly : true, buttonImage : "<%= asset_path('iconDatePicker.gif') %>", showOn : "both", changeMonth : true, changeYear : true, yearRange : "c-20:c+5" }) So far so good. I can edit the record and it persists the date correctly all the way to the DB. My problem is when I want to edit the record again. When the form is pre-populated from the record it displays in 'yyyy-mm-dd' format. The javascript only formats dates which are selected in the datepicker control. Is there any way I can format the date retrieved from the database? At which stage can I do this? Thanks, Dany. Some more details following the discussion below, my form is spread across two files, a view and a partial. Here's the view: <%= form_tag("/shows/update_individual", :method => "put") do %> <% for show in @shows %> <%= fields_for "shows[]", show do |f| %> <%= render "fields", :f => f %> <% end %> <% end %> <%= submit_tag "Submit"%> <% end %> And here's the _fields partial view: <p> <%= f.label :name %> <%= f.text_field :name %> </p> <p> <%= f.date %> <%= f.label :date %> <%= f.text_field :date, :class => "datepicker" %> </p> Controller code: def edit_individual @shows = Show.find(params[:show_ids]) end

    Read the article

  • date() is showing December 1969

    - by Doug
    $sql = "SELECT * FROM news ORDER BY `news_id` DESC LIMIT 1"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_assoc($result); $date = $row['time_posted']; echo "<i> " .date("Y/m/d", $date) . "</i>: "; I used timestamp in mysql. So, what's the problem?

    Read the article

  • Problem using date when querying the appengine datastore

    - by manu1001
    I'm running this query: SELECT FROM com.Data WHERE entryDate DATE('2010-3-16') I get this error: org.datanucleus.store.appengine.query.DatastoreQuery$UnsupportedDatastoreFeatureException: Problem with query DATE('2010-3-16'): Unsupported method while parsing expression: InvokeExpression{[null].DATE(Literal{2010-3-16})} The same query works when I use it on the admin console. But it does not work for code (java), either locally or when deployed. Any ideas?

    Read the article

  • displaying data between date ranges mysql

    - by Kyle Hudson
    Hi Guys, I need to work out a period of 6 months (backwards) from a given date. Example date: 07/06/2010 00:00:00 needs to count back 6 months and display: 07/12/2009 00:00:00 I have been scanning through: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html and non of these functions make sense to me :( Hope this makes sense and any help would be appriciated. Kyle

    Read the article

  • Howto extract text from a file where date -time is the index

    - by Soham
    I have got around 800 files of maximum 55KB-100KB each where the data is in this format Date/Time/Float1/Float2/Float3/Float4/Integer Date is in DD/MM/YYYY format and Time is in the format of HH:MM Here the date ranges from say 1st May to 1June and each day, the Time varies from 09:00 to 15:30. I want to run a program so that, for each file, it extracts the data pertaining to a particular given date and writes to a file. I will not face any problem in writing into directory operations. I am trying to get around, to form a to do a search and extract operation. I dont know, how to do it, would like to have some idea. Thanks Soham

    Read the article

  • Can MYSQL filter by date if date is stored as text? ex "02/10/1984"

    - by Roeland
    Hello! I am trying to modify an app for a client which has already a database of over 1000 items. The dates are stored as text in the database with the format "02/10/1984". The system allows you to add and remove fields to the catalog dynamically and it also allows the advanced search to have specific fields be allowed. The problem is that it wasn't designed with dates in mind, so when I set a field as a date, and try to search by a range the query is trying to do a AND (cfv0.value = 01/02/2004 AND cfv0.value <= 05/03/2008) . I can make it so the date range passed is a numeric time value. Is there a way that when sending the query, it takes the text fields (with the date) and converts it to numeric time value so at that point I am basically just comparing numbers which would work fine. I do not have the option to change all the current date to numeric value due to the way the dynamic fields are set up. Thanks guys!

    Read the article

  • Jquery DateJs, is there validation for full date?

    - by Cesar Lopez
    Hi all, I just find out about the power of date js, And its great!!! As I am a newbie I was wondering if there is any kind of general validitation for different types of full dates. eg. var d1 = Date.parse('2000-10-18, 10:06 AM'); alert(d1.toString('HH:mm')); If date is ('200-10-18, 10:06 AM'), of course it doesn't like it. So my question is if there is any quick way to validate the full date, rather than having to validate one by one. Thanks.

    Read the article

  • date comparisons in Rails

    - by aressidi
    Hi there, I'm having trouble with a date comparison in a named scope. I'm trying to determine if an event is current based on its start and end date. Here's the named scope I'm using which kind of works, though not for events that have the same start and end date. named_scope :date_current, :conditions => ["Date(start_date) <= ? AND Date(end_date) >= ?", Time.now, Time.now] This returns the following record, though it should return two records, not one... >> Event.date_current => [#<Event id: 2161, start_date: "2010-02-15 00:00:00", end_date: "2010-02-21 00:00:00", ...] What it's not returning is this as well >> Event.find(:last) => #<Event id: 2671, start_date: "2010-02-16 00:00:00", end_date: "2010-02-16 00:00:00", ...> The server time seems to be in UTC and I presume that the entries are being stored in the DB in UTC. Any ideas as to what I'm doing wrong or what to try? Thanks!

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >