Jump to content

Search the Community

Showing results for tags 'date'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 18 results

  1. maddymath

    Maddy

    Hi all, I am looking to create automated emails for my work. I'm quite a novice coder and the only code format Mailchimp allows in email campaigns is HTML. I want to create an automated email that goes out every week that asks our contributors to submit an artwork for the following week. I am wondering if there is a piece of date / time HTML that would allow me to say: "current date + 7 days" so I don't have to manually add the dates in for every email. Hopefully that makes sense! Thanks in advance for your help, Maddy
  2. Formatting dates seem to be not working in the examples of W3 schools. Any ideas why? https://www.w3schools.com/js/js_date_formats var d = new Date("2015-03-25"); results in: Wed Mar 25 2015 01:00:00 GMT+0100 (Central European Standard Time)
  3. Hi, I've got a table with waypoints in my db (called points), these waypoints combine to a route due to the the timestamp in the start and stop column. Now I would like to change the date and/or date + hour to use the track on a different date or start at a differnt hour. But i also would like to keep the intervals between the records. ID Name Lat Lon Start Stop 526 Waypoint X 52.14722000 6.39720000 2020-03-30 20:37:32.0 2020-03-30 20:47:32.0 527 Waypoint Y 52.14670000 6.39139000 2020-03-30 20:47:32.0 2020-03-30 20:52:32.0 528 Waypoint Z 52.14248000 6.39125000 2020-03-30 20:52:32.0 2020-03-30 20:57:32.0 529 Waypoint X 52.14722000 6.39720000 2020-03-30 20:57:32.0 2020-03-30 21:02:32.0 530 Waypoint Y 52.14670000 6.39139000 2020-03-30 21:02:32.0 2020-03-30 21:07:32.0 531 Waypoint Z 52.14248000 6.39125000 2020-03-30 21:07:32.0 2020-03-30 21:12:32.0 532 Waypoint X 52.14722000 6.39720000 2020-03-30 21:12:32.0 2020-03-30 21:17:32.0 533 Waypoint Y 52.14670000 6.39139000 2020-03-30 21:17:32.0 2020-03-30 21:22:32.0 534 Waypoint Z 52.14248000 6.39125000 2020-03-30 21:22:32.0 2020-03-30 21:27:32.0 535 Waypoint X 52.14722000 6.39720000 2020-03-30 21:27:32.0 2020-03-30 21:32:32.0 536 Waypoint Y 52.14670000 6.39139000 2020-03-30 21:32:32.0 2020-03-30 21:37:32.0 Is it possible to use an update querey to change only a part of a datetime stamp? See the colored examples shown below. 2020-03-30 20:37:32.0 2020-03-30 20:37:32.0 Thanks in advance for your help. Arjan
  4. Hi – I’m having a lot of trouble with a where clause with a date in my sql query. It seems I have tried everything and read many articles & blogs, but I can’t get it working. I understand the data type is very important to match up and the format also. Anyway I’ll tell you what I’ve got and see if anyone can help me. I’m joining 3 tables in my query – everything works fine and I get the results I want UNTIL I add the where clause. Unless there is something I need to change because of the where clause, I shouldn’t need advice on that. Tables Fields Kiosks – kioskID, workDate, locationID, workerID, bills, coins - workDate is type Date Locations - locationID, storeName, branchName, locationAbbrev Workers - workerID, firstName, lastName, phoneNum $sql = "SELECT Kiosks.kioskID, Kiosks.workDate, Locations.locationAbbrev, CONCAT(Workers.firstName, ' ', Workers.lastName) AS workerName, Kiosks.bills + Kiosks.coins AS amount FROM Locations INNER JOIN Kiosks ON Locations.locationID = Kiosks.locationID INNER JOIN Workers ON Kiosks.workerID = Workers.workerID”; This part works fine and I get a long list showing the Date, Location, Worker, and Amount using PHP. BUT,(everybody’s got a big BUTT) when I tack on the Where clause – kapoof!! When I try different formats I get either 0 results or unable to process messages. Here are a couple of things I’ve tried – hopefully someone can spot the error in my ways. Thanks $sql = "SELECT Kiosks.kioskID, Kiosks.workDate, Locations.locationAbbrev, CONCAT(Workers.firstName, ' ', Workers.lastName) AS workerName, Kiosks.bills + Kiosks.coins AS amount FROM Locations INNER JOIN Kiosks ON Locations.locationID = Kiosks.locationID INNER JOIN Workers ON Kiosks.workerID = Workers.workerID WHERE Kiosks.workDate = '2017-12-05'"; Also tried without quotes like = 2017-12-05 $sql = "SELECT Kiosks.kioskID, Kiosks.workDate, Locations.locationAbbrev, CONCAT(Workers.firstName, ' ', Workers.lastName) AS workerName, Kiosks.bills + Kiosks.coins AS amount FROM Locations INNER JOIN Kiosks ON Locations.locationID = Kiosks.locationID INNER JOIN Workers ON Kiosks.workerID = Workers.workerID WHERE year(Kiosks.workDate) = 2017 AND month(Kiosks.workDate) = 12 AND day(Kiosks.workDate) = 5";
  5. Hi, i'm reading back and forward but not really coming t a solution. I would like to grab the content of an input field (not inside a form) i am using for date, but just as string. the needed output format is always DD/MM/YYYY so said : 12.02.16 or 2016 12.2.16 or 2016 12-02-16 and so on should all result in 12/02/2016 if there would be a timestamp behind it just needs to be cutted off. I really thought this would be easier :-) But it isn't Maybe somebody could point out a good article or solution for me. Thx. I'm really struggling with the regular expressions :-) var txt='31-12/2016'; var re1='(\\d)'; // Any Single Digit 1 var re2='(\\d)'; // Any Single Digit 2 var re3='(.)'; // Any Single Character 3 var re4='(\\d)'; // Any Single Digit 1 var re5='(\\d)'; // Any Single Digit 2 var re6='(.)'; // Any Single Character 4 var re7='((??:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3})))(?![\\d])'; // Year 1 var p = new RegExp(re1+re2+re3+re4+re5+re6+re7,["i"]); var m = p.exec(txt); if (m !== null) { var c1=m[1]; var c2=m[2]; var c3="/"; var d1=m[4]; var d2=m[5]; var c4="/"; var year1=m[7]; alert(c1+c2+c3+d1+d2+c4+year1+"\n"); } else { alert("Please check format"); }
  6. Hi, I was looking for a topic related to customizing an input type="date" to only select days from weeks, but I could not find something related to it. Could you please help me with this one ? Thanks. PD: I did this with JS, but I don't know if it is possible to set it directly in the input tag.
  7. I want to be able to use the current date to solve a math problem, specifically as follows:If today is March 17, the math problem of the day should be:(Month times Day of Month) + 99 = Answer of the Day(3 x 17) + 99 = 150How can I create a java script to find the current month and the current day of month, multiple those two together, then add 99 and display the answer as a result. Ideally I'd like to embed this into an existing simple html page by referencing the JavaScript "math problem" so when "index.html" is opened, I have a line that shows immediately: "The answer of the day is: X" (or 150 today, etc). Thank you -- JB
  8. Hello, I want find difference between 2 dates in days in xslt1.0. I didn't find any in built function anywhere. Does anyone have idea on this? Please help me I am new in xslt. Thanks in Advanced. regards, Nitin
  9. <!DOCTYPE hmtl><html lang = "en-US"> <head> <meta charset = "UTF-8"> <script type = "text/javascript"> window.onload = myFunction; var i = 11; function myFunction() { document.getElementById("output").innerHTML = display(); setTimeout(myFunction, 1000); } function display() { i--; var prompting; if (i == 0) { i = 10; prompting = confirm("Do you want to go?"); if (prompting == true) { window.location = "http://www.google.com"; } } return "You will be re-directed in " + i; } </script> </head> <body> <div id = "output"></div> </body></html> Hi guys, I just made this little countdown clock, but one thing is really confusing me, the setTimeout() function up there, it works fine, but whenever I replace it with setInterval(), the variable i doesn't step down by every 1 unit at all, instead, it goes like, 9 ....7....3, but when I use setTimeout(), it goes 10..9..8.. till 0. You guys know why? Thank you very much.
  10. i came to learn that future and past dates are calculated with the simple use of "strtotime()". but this is calculated in relating with current date. i want to know if a future date can be calculated in relation with database stored date? for example, if '2014-01-01' is stored in database, how can i get the date of 30 days(i.e.-2014-01-30) ahead from this date?
  11. Is there anyone that write me a javascript code that will display a certain message based on what time of day it is and what day of the week it is. I run a radio stations website and they want to put up a schedule of their on-air staff and shows on their website.Here is a code i found that worked, but it's just time in general, not what day of the week. Also, how can I make it to get the time in a certain time zone? No message at the present timefunction show() {var nowhrs = new Date().getHours();var nowmins = new Date().getMinutes();var hrsmins = nowhrs + (nowmins/60); // decimals of an hourvar schedule = [['Message 1',[9],[18]], // times are expressed as hours + decimals of an hour, e.g. 30 minutes is .5 hours.['Message 2',[18],[21.5]],['Message 3',[19.5],[20.25]]]var themessage = "";for (var i =0; i = schedule[i][1]) && (hrsmins < schedule[i][2])) {themessage += schedule[i][0] + "";document.getElementById("mymessage").innerHTML = themessage;}}}
  12. Hey ... I want display datetime from DB... EX : 2013-06-10 12:10:5 I want display only year = 2013 MONT = 06 day = 10 how to do like above display the part from datetime. thanks regards
  13. Greetings, I am really new at coding php. I have been working for a while and doing some Google searches. I am trying to make a registeration page for something I am working on. I can get everything in the database but dates & times. Right now it's all bogus information. I am curious on how to take a date (like a birthday) and write it to my MySql datebase? Every attempt I have made that is the only piece that doesn't get written. Also I am having an issue with the php date getting into the database. Html code <!DOCTYPE HTML><html><head><title>Demo Game</title></head><body><h1>Test page</h1><p>This is a demo page. More to come.</p><p>In the area below. You will find a location for registration. Please attempt to make an account.</p> <!-- Divide for form formatting --> <div id="container" style="width:250px"><!-- Form for registering new users into the game. --><form id="register" action="reg.php" method="post"> <fieldset> <legend>Registration</legend> <div id="col1" style="width:75px; float:left;"> Username:<br> Password:<br> First name:<br> Last name:<br> Birthday:<br> Email: </div> <div id="input" style="width:100px; float:left;"> <input type"text" name="username" placeholder="Username" required autofocus><br> <input type="password" name="password" placeholder="Password" required><br> <input type"text" name="fname" placeholder="First Name" required><br> <input type"text" name="lname" placeholder="Last Name" required><br> <input type="date" name="bday" placeholder="(MM/DD/YYYY)" required><br> <input type="email" name="email" placeholder="Email address" required> </div> <div id="gender" style="text-align:center; clear:both;"> Gender: <select name="gender"> <option value="Male">Male</option> <option value="Female">Female</option> </select><br><br> </div> <input type="submit" value="Register"> </fieldset></form></div> </body></html> php code <?php// Variables//$Date = now();$User = "";$Password = "";$Database = "testgame";$Table = "players";$Host = "localhost";$sqlDate = date('Y-m-d H:i:s'); //Check to make sure variables are set from index.htmif(isset($_POST[username]) && isset($_POST[password]) && isset($_POST[fname]) && isset($_POST[lname])&& isset($_POST[bday]) && isset($_POST[email]) && isset($_POST[gender])){// Connect to the servermysql_connect($Host, $User, $Password) or die (mysql_error()); //Check connectivitymysql_select_db($Database) or die(mysql_error()); // Insert data into DB$insert = "INSERT INTO $Table (username, password, name, last, email, birthday, registered, gender) VALUES('$_POST[username]', '$_POST[password]', '$_POST[fname]', '$_POST[lname]', '$_POST[email]', '$_POST[bday]', '$sqlDate', '$_POST[gender]')"; //Check to see if the name exists (no duplicates)$result = mysql_query("SELECT * FROM $Table Where email = '$_POST[email]'"); echo $_POST[email]; if($result){ if(!mysql_query($insert)) { die (mysql_error()); echo "Record added. "; }}else { echo "Email already used."; } mysql_close($con); } //End of check ?>
  14. Hi! I have one issue with date translating. Here is my code: <?php $day = date("l"); $daynum = date("j"); $month = date("M"); $year = date("Y"); if($day == "Monday"){ $day = "Ponedjeljak"; }elseif($day == "Tuesday"){ $day = "Utorak"; } /* etc, translating day */ if($month == "January"){ $month = "siječnja"; }elseif($month == "February"){ $month = "veljače"; } /* etc, translating month */ elseif($month == "December"){ $month = "prosinca"; } echo $day . ", " . $daynum . ". " . $month . " " . $year . "."; ?> Now, problem is: Why output is "Utorak, 11. Dec 2012." (there should be "Utorak, 11. prosinca 2012.")? It translated only day, but not month, although code for month is similar to code for day.
  15. Nuker_Viper

    Date problem

    i don't quite understand why it displays this: here is the basic code... <?php$TZ = getTZInfo("tz", getMemberInfo("timezone", $membername));$T = getTZInfo("tz_plusminus_hours", getMemberInfo("timezone", $membername));$DST = getMemberInfo("timezone_dst", $membername); if($DST == "On") { $D = "1"; }else { $D = "0"; } $TF = ($T+$D); if($logged_in == "1") { $displaydate = gmdate("l, F j, Y - g:i A - $TZ", time()+(("$TF"+date("I"))*3600)); }elseif($logged_in != "1") { $displaydate = gmdate("l, F j, Y - g:i A - e", time()+((-5+date("I"))*3600)); } ?>
  16. this is a personal side project of mine, i am trying to change the time constraints of the hours, minutes, seconds, as well as change the start of the year to whatever I want it to be. ie days are 35 hours long, hours are 92 minutes long, minutes are 16 seconds long, and seconds are 200 milliseconds long, and the start of the year is February 29th is the beginning of the year in corralation to today's date, and have all of this done in the 24 hour time format where when the program first loads it works i would like to have this done in JavaScript, can someone help me??
  17. In the xml schema data type --> date allows date as yyyy-mm-dd format by default.How can we modify it so that it accepts yyyy/mm/dd format style instead ?
  18. Hi I have a column in my database which is called "lastupdated" it stores a unix date and time stamp '1331299541' Fri, 09 Mar 2012 13:25:41 GMT. I want to run a query to retrieve any activity that happens that day. $query = "SELECT * FROM contacts WHERE lastupdated = '1331299541'"; As you can see i'm quite new to this so looking to be pointed in the right direction. I know its to do with formatting the date stamp? Cheers Chris
×
×
  • Create New...