I use `<input type="date">` and it works fine to bring up a date picker in Chrome and Firefox. However, it behaves as a normal textbox in Safari.

Member Avatar
Member Avatar
+0 forum 4

I run a website where I periodically post articles. I'd like to add a timestamp/datestamp to each article showing the post date (the upload date, I assume, would be the logical choice). I had already asked for advice on this topic; unfortunately, the result is a blank. Literally. Here's an example: http://theapplenewsreel.com/Example.php After the title and subtitle, there's some small (<h6>) text, which should be followed by the PHP code which displays a timestamp. I'm new to PHP, so I may be doing something wrong. Any advice?

Member Avatar
Member Avatar
+0 forum 9

I have a datagridvied with several columns and one with date and the format is Me.DataGridView1.Columns("Doopdatum").DefaultCellStyle.Format = "yyyy - MM - dd dddd" or Me.DataGridView1.Columns("Doopdatum").DefaultCellStyle.Format = "dddd dd - MM - yyyy" Depends on the button i press My problem is when i reverse from "yyyy - MM - dd dddd" to "dddd dd - MM - yyyy" It dos not work proper I have the folowing code to reverse the date Private Sub DoopdatumOmdraaienToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DoopdatumOmdraaienToolStripMenuItem.Click If DoopdatumOmdraaienToolStripMenuItem.CheckState = CheckState.Checked Then Me.DataGridView1.Columns("Doopdatum").DefaultCellStyle.Format = "dddd dd - MM - yyyy" For Each row As DataGridViewRow …

Member Avatar
Member Avatar
+0 forum 5

Just for fun I went to the start of the [Word Association Game](https://www.daniweb.com/community-center/threads/302/word-association-game#post2075) thread. I noticed it was started 14 years ago but there seems to be a problem with the date order. Post 1 - 14 years ago - Lucy Post 2 - 13 years ago - cellphone --> wireless Post 3 - 13 years ago - Wireless --> Networking Post 4 - 14 years ago - Lucy --> in the sky with diamonds I know it's a trivial thing but it might be a trivial thing that affects other threads by upsetting the continuity.

Member Avatar
Member Avatar
+0 forum 1

Hi, I am stuck with a problem. I have two Date objects (util class objects). I want the difference between these two dates as the number of days between them? I am using Java 8. Can you please help me with this? Searched the web a lot. Some are saying to use Joda, while some are using TimeUnit. Some says Timeunit not handles leap year properly etc. I am confused now. Here is the link I read: http://stackoverflow.com/questions/20165564/calculating-days-between-two-dates-with-in-java Thanks in advance.

Member Avatar
Member Avatar
+0 forum 8

How can i get the end of the month or the beggining of the month to create a new table for records ? i have this code but it gets the current month... <?php $user = getUserData('users', 'UserUsername'); $sql = "SELECT `ticket_id`, `Uplata`, `Dobivka`, `Date` FROM `kladilnica` WHERE `Username`='$user'"; $result = $conn->query($sql); $count = 0; $uplata_total = 0; if($result === false) { echo "<b>Could not connect to database.</b>"; trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR); } else { if($result->num_rows == 0) { echo "<b>You do not have any tickets.</b>"; } else if($result->num_rows >= 1) { …

Member Avatar
Member Avatar
+0 forum 9

Hi. I need to be able to display each day of the current month excluding Sunday in a format: month/day (eg. 11/11). So I want the output to be: [CODE]11/11 11/12 //excludes Sunday 11/14 11/15[/CODE] etc. Does anyone know how to do this? Thanks

Member Avatar
Member Avatar
+0 forum 10

Hi Guys, I am currently making a site again for a follow-up but now it needs date! I am currently testing it on a simple html, I found this simple code on the internet but as you can see for my title I need to like sort of "autoformat while typing to mm/dd/yyyy" so can you give me some tweaks, by the way this code down here requires you not to type anymore in the textbox I need to have an autoformat typing [CODE]<html> <head> <script type="text/javascript"> function zp(n){ return n<10?("0"+n):n; } function insertDate(t,format){ var now=new Date(); var DD=zp(now.getDate()); var …

Member Avatar
Member Avatar
+0 forum 8

Hi Php'ers, I'm new to Php. I have some issues INSERTING date to MySQL by PHP. here's my code snippet: //date format $date1 = mysqli_real_escape_string($_POST['j_avail']); $d1 = date('Y-m-d',($date1)); $date2 = mysqli_real_escape_string($_POST['j_expir']); $d2 = date('Y-m-d',($date2)); the query: $sql = "INSERT INTO table (....,j_avail,j_expir) VALUES (....,'$d1','$d2')"; the HTML: <td id="ititle">Availability :</td> <td><input type="date" name="avail" id="datep"></td> </tr> <tr> <td id="ititle">Expiration :</td> <td><input type="date" name="exp" id="datep"></td> </tr> When i execute my the code and check my db i get this 1970-01-01. i also have tried strtotime it also gives me this result. Dont know whats the issue here. hmmmm Thanks. OTEP

Member Avatar
Member Avatar
+0 forum 2

Hi al you wonderful daniweb peoplez :) I am currently on a mission to write some cool javascript / jquery / ajax controls and now i realised that if I call the control multiple times it seems to lose scope. I realise that this is a small design flaw, and would lie to know how I can correct this? I would like to create new instances for each call. Here is the javascript that would create the control: var testProperties = { testControlId: '', defaultText: 'Hello World', }; $.fn.watermarkInput = function watermarkInput(newProperties) { // Make sure that all settings have …

Member Avatar
+0 forum 0

How to change the format of: --> var enterDate = '2016-01-15'; // to 2016-01-15T00:00:00.0000000+08:00 with JS syntax? // I try these and none of these works out: 1) enterDate.format("yyyy-mm-ddT00:00:00.0000000+08:00"); console.log(enterDate); 2) enterDate.toLocaleFormat("%B %e, %Y %M:%S"); Thanks in advance.

Member Avatar
Member Avatar
+0 forum 1

Hi, I am developing a system that need to monitor machines' licence, so i have a field 'movedate' and 'outdate' every machines can only been kept for 2 years for most. and if the machine didn't go out for almost 2 years, an alert will come out to remind the tenant. I want the alert will come out about 2 weeks before the expire date. But Im not sure how to do it..can someone guide me?

Member Avatar
Member Avatar
+0 forum 8

Some folks go on vacation around the Easter holidays, so it would be nice to know when Easter happens in the years ahead. I had this as a Python snippet in my "oldies, but goodies" file and translated it to Go. It was actually quite easy in this case, and a good IDE like LiteIDE helped a lot.

Member Avatar
Member Avatar
+0 forum 1

SQL Gurus, help !! I have a table with 3 fields, ID, Answer_5, Answer_6. Answer_5 & Answer_6 both hold a date value, but the fields are defined as string (for other reasons). In Answer_6 it is possible to have the string of 'Now'. I am trying to do a simple select as follows, changing fields on the fly to make 'Now' equal today's date: select id, answer_5, CASE when answer_6 = 'Now' THEN cast(GETDATE() as date) when answer_6 is NULL then cast('01/1990' as date) ELSE cast(answer_6 as date) END AS new_answer_6 from tDataMult I get "Conversion failed when converting date …

Member Avatar
Member Avatar
+0 forum 3

I want to know how to achieve the following: I want to convert a varchar to a date format but so far I'm not very successfull... My date (varchar) looks something like this: 02-02-2012 11:48 AM And I want to convert it to the following this: dd-mm-yyyy To be able to use the BETWEEN clause in the end. I have the following script but it is not correct so any help regarding this will help me a lot! SELECT Con_Consult_Date FROM Consultation WHERE CONVERT(varchar(30), Con_Consult_Date, 105) BETWEEN '01-01-2013' AND '31-12-2013' GO

Member Avatar
Member Avatar
+0 forum 1

Hi friends. With `datetime.datetime.now()` or `datetime.datetime.today()` i can get the current date (English calendar) for my program but what about if i want to get the current date (from Persian calendar) for my program; then what should i do? As my pc os date is set to English calendar so what can i do?

Member Avatar
Member Avatar
+0 forum 2

Hello friends. I want to create a countdown program for the new year that is comming. I know i can use this code for example, for short certain time: from threading import Timer def sayhi(): print "hello everybody!" t = Timer(10, sayhi) t.start() But the new year begins in 29 days (2015, march 21)(at 02:15:11 AM). So i cant calculate how many seconds is left!! So what can i do? I think i should give the date to the program and it should use a calendar maybe, but i don't know how.

Member Avatar
Member Avatar
+0 forum 13

Hello, I call php from js file with parameter date. Date has other format when it run in IE and Mozzila. Whats problem ? IE : Tue Jun 18 19:00:00 UTC 0200 2013 Mozille : Thu Jun 20 2013 18:30:00 GMT 0200 (Central Europe Standard Time)

Member Avatar
Member Avatar
+0 forum 4

Hey guys, I have this script that does count one year of files, 2014, but when it comes to this year, everything messes up. How could I count properly for each year in the same script ? In the attached screenshot it's obvious that I would only need 2014 - all of the months and from 2015 only January, but .... how ? Thanks in advance! ls -la | awk -v year="$(date "+%Y")" 'BEGIN { split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec", month, " ") for (i=1; i<=12; i++){ mdigit[month[i]]=i } } !/^-/{next} $8 ~ …

Member Avatar
Member Avatar
+0 forum 4

Hi Guys, Im currently working with application, where it will automatically inform the user that there is an overdue account today. i decided to compare the current date(today) to stored date in mysql database, heres my code: Public Sub getReminder() Dim _con1 As New MySqlConnection Dim _cmd1 As New MySqlCommand Dim dr As MySqlDataReader Dim date1 As String With _con1 .ConnectionString = "server=xxx.xxx.x.x;uid=xxx;pwd=xxx;database=daspatch" If _con1.State = ConnectionState.Closed Then _con1.Open() End If End With 'date1 = Convert.ToDateTime(Today) _cmd1 = New MySqlCommand("SELECT date_due FROM billing_tbl", _con1) date1 = Date.Today dr = _cmd1.ExecuteReader() If dr.HasRows Then MsgBox("You have account already due") Else MsgBox("You …

Member Avatar
Member Avatar
+0 forum 5

OK I know the DateTime structure is very good at doing this. But if you ever wanted to design your own calendar, or just wanted to know how things are possibly done, this could be a handy function. Enjoy.

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have a number of files within a directory which are named Log-2014-01-21.txt and similar. What I’m trying to do is write a program that will archive these files based on the month that is in the file name rather than the file Info. The part I’m struggling with is getting the date out of the string which will work for different string lengths i.e if the file was called error-log-2014-11-11.txt. Is there a nice way of doing a string spilt to accomplish this, or another method? Kind Regards

Member Avatar
Member Avatar
+0 forum 3

Hi, had a date/boot problem for a long time and What was happening is this: At first the computer refused to boot at all... pure black screen no writing, so knowing my battery was propbably flat, I would leave it on for a minute or so, reboot again, and contrary to what many IT so called specialist say...the flat battery would get just enough charge to boot past the bios, and would then get to a black screen saying blah blah blah, and to continue press F!, which would boot me to windows but with a corrupted date. From there …

Member Avatar
Member Avatar
+0 forum 1

Hi.. How to get the difference between two dates using C#.NET web application in form of days? If anybody knows plz help me..Itz very urgent.

Member Avatar
Member Avatar
+0 forum 9

i have this error "input string not in correct format"

Member Avatar
Member Avatar
+0 forum 2

In an attempt to use selection lists in php ,i tried it for displaying date on a web page <?php echo"<html> <head><title>Select a Date </title></head> <body>"; $monthname=array(1=>"January","Februray","March","April","May","June","July","August","September","October","November","December"); $time=time(); $today_date=date("M-d-Y",$time); //returns the current date echo "<div style='text-align:center'>\n"; echo "<h3>Today is $today_date</h3><hr />\n"; echo "<form action='process_form_date.php' method='POST'>\n"; //selection list for month $todayMO=date("M",$time); //returns the current month echo "<select name='dateMonth'>\n"; for ($M=1;$M<=12;$M++) { echo "<option value = $M"; if($todayMO == $M) echo "selected"; echo "> $monthname[$M]\n</option>"; } echo "</select>\n"; //selection list for day $todayDay=date("d",$time); echo "<select name='dateDay'>\n"; for($n=1;$n<=31;$n++) { echo "<option value = $n"; if($todayDay == $n) echo "selected"; echo ">$n</option>\n"; } echo …

Member Avatar
Member Avatar
+0 forum 5

I have a textbox to enter date into a MS Access database. I've tried entering 29-02-2000. But it is saved as 28-01-1900 in Access. I've tried entering 02-20-2000. But it is saved as 01-01-1900 in Access. My system shortdate format is dd-MM-yyyy. My system longdate format is dd MMMM,yyyy. My Access datefield property is date/time with property set as Short Date-19-06-2007 and blank inputmask. How to solve the problem once and for all irrespective of the system date the program is run in. I'm a beginer.

Member Avatar
Member Avatar
+0 forum 1

I need to insert a cobobox value ,date value into database but am not sure if this is the method...i keep getting an exception saying 'Incorrect syntax near '@Numberpassengers'.' private void button1_Click(object sender, EventArgs e) { string c = ""; string s = ""; string d = ""; string t = ""; if (CarNameCombo.SelectedIndex >= 0 && SourceCombo.SelectedIndex>=0 && DestinationCombo.SelectedIndex>=0&&comboBox7.SelectedIndex>=0) c = CarNameCombo.Items[CarNameCombo.SelectedIndex].ToString(); s = SourceCombo.Items[SourceCombo.SelectedIndex].ToString(); d = SourceCombo.Items[DestinationCombo.SelectedIndex].ToString(); t = comboBox7.Items[comboBox7.SelectedIndex].ToString(); string date=dateTimePicker1.Text; string date1=dateTimePicker2.Text; SqlConnection conn = new SqlConnection("Data Source=PRAVEEN\\SQLEXPRESS;Initial Catalog=travelbooking;Integrated Security=True"); SqlCommand cmd = new SqlCommand("insert into BookDetails(CarName,Source,Destination,Date,FromAddress,ToAddress,Time,Numberpassengers)VALUES(@CarName,@Source,@Destination,@Date,@FromAddress,@ToAddress,@Time,@Numberpassengers"); cmd.CommandType = CommandType.Text; cmd.Connection = conn; cmd.Parameters.AddWithValue("@CarName", c); cmd.Parameters.AddWithValue("@Source", …

Member Avatar
Member Avatar
+0 forum 17

Looking for options for a more current BIOS for a retired Toshiba A40. Have been cautioned that this could be very destructive. Guidance sought

Member Avatar
Member Avatar
+0 forum 2

Hi guys. i have an event page that displays events from database. in my database I have a column with datetime format. is there a way to only get the date or time separate from each other in a select to be displayed? php: <?php require "connection.php"; $sessid = $_SESSION['sess_user_id']; $check = $dbh->prepare("SELECT * FROM event WHERE euser_id = $sessid ORDER BY start_event ASC "); $check->execute(array('euser_id')); if($check->rowCount() > 0) { $check->setFetchMode(PDO::FETCH_ASSOC); while($row = $check->fetch()) { $dstart = $row['start_event']; echo "<tr> <td>$dstart</td> </tr>"; } } ?> so right now in the database column start_event its like : 2014-08-09 13:30:00:00000 and what …

Member Avatar
Member Avatar
+0 forum 2

The End.