Member Avatar

dear friends m using strtotime () function to compare two dates , but it is not working for the date greater then '19-jan-2038'.my os is win 7 32 bit and php 5.2 and apache 2.2.plz if any body having any solution , kindly share it

Member Avatar
0
28
Member Avatar

Hello I have a web form, whereby I want to allow users to only input dates in the format DD/MM/YYYY. I've tried with the following code to show an error message if the date is not valid, however if I add something like 5/5/5, it still passes is as a valid value. $('#DateB').blur(function(){ var s= $('#DateB').val(); var dateRegex = '^(0[1-9]|1[012])[\/\-](0[1-9]|[12][0-9]|3[01])[\/\-](19|20)\d\d$'; if(!dateRegex.match(s)){ $("#msgDOB").val("date format not valid"); $("#msgDate").css("display","block"); }else { $("#msgDate").css("display","none"); } }); Anyone can pls help me fine-tune this code?

0
8
Member Avatar

I'm trying to set a time limit of like 2 mins after time of a click event. How can I achieve this? Most of the countdown timers I see all over the internet are countdowns to dates like Aug 23, 2015

Member Avatar
0
9
Member Avatar

I did code for challenge that I saw posted for C# by deceptikon: http://www.daniweb.com/software-development/csharp/threads/479304/coding-challenge-string-to-date Here it is. Of course normally the code would be without prints and put in function, but this is enough for now for me. There could also be normalization from '/' separated form not producing ambiguous form, checking for single digit month/day. Notice that reversed order of slice assignement is a must as well as variable holding the original length or that length's format!

1
39
Member Avatar

I have 2 input fields that when a user inputs the date in say mm-dd-yyyy format, i would like to have it automatically change to yyyy-mm-dd (ISO 8601 Date Format) the input fields are very simple: <div class="form-group"> <label for="purchase_date">Purchase Date <font size="-3">(Year-MM-DD) format</font></label> <input type="text" name="purchase_date" class="form-control" placeholder="Purchase Date"> </div> <div class="form-group"> <label for="warranty_end_date">Warranty End Date <font size="-3">(Year-MM-DD) format</font></label> <input type="text" name="warranty_end_date" class="form-control" placeholder="Warranty End Date"> </div> is there a way to do this without using datepicker? I dont want to add any extra styling sheets or any extra js..

0
5
Member Avatar

Hi all I have a json format which has two objects Created_date and Reply_date. Created_date has a date on which a message is created and the Reply_date tells when the user has replied to that messge. So I am getting the Created_date as follows var createDate = new Date(Created_date); var newDate = createDate.getDate(); var month = createDate.getMonth(); var monthArray = new Array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); var year = createDate.getFullYear(); var compareMonth = monthArray(month); var displayDate = compareMonth+ " "+ newDate+" , "+ year; alert(displayDate); So this returns the created date. Now I would like to compare the created date and the reply …

Member Avatar
0
17
Member Avatar

Hi Guys, I need help with inserting date from HTML <input type="date"/> into oracle DB It seems that i need to make some kind of adjustment with oracle date. please help me...

0
2
Member Avatar

Hi Everyone, Thank you ahead of time for taking a look... Basically, the tables, rows, name and id tags below shown are pulled through by using PHP/cURL (code not shown for sake of realty). Generally, what I am looking to accomplish, is to use JavaScript to loop and parse through each of the two known values (also pulled through PHP/cURL) "dateset1" and "dateset2" input fields and then have the day span difference results show in "age" input field. Obviously, I can only retrieve the values and show results from the first instance because of not having a unique id or …

Member Avatar
0
8
Member Avatar

Hello, I need to display last released version date in my application. I am displaying last build/compiled date as version date with below code. DateTime buildDate = new FileInfo(Assembly.GetExecutingAssembly().Location).LastWriteTime; lbldate.Text = buildDate.Date.ToString("dd/MM/yyyy"); but if I update the live server with latest code other than today, then it is displaying the date when we update the server with latest code instead last build/compiled date. one another que, Is code compile on live server? that's why it is displaying that date. is there any way to display last build/compiled date as release date? Thanks, KK

Member Avatar
0
4
Member Avatar

If anyone is able to help, I'd like to create a single-line text on my site that says "Happy birthday to Samantha" whenever it's her birthday, or whenever it's another kid in my program's birthday. Including the capacity for multiple birthdays on the same day (comma spaced), the date, and/or how old they are would be icing on the cake (no pun intended); but I wouldn't mind just something basic. On days without birthdays, I'd like for the space to be blank. Any help would be greatly appreciated. I've searched Google, and the best I could find was this page …

Member Avatar
0
21
Member Avatar

Hi all I am writing a java program to display the dob of sportsperson, now I have use the java.util.Date to display the date on to the consloe. But since it is deprecated I wish to use some other method to get and display the date from the user. Here is my code. package com.MyExampleProject; import java.util.Date; class playerDetails{ String name; Date dob; int totalMatchesPlayed; /*int highestRunsScored; int noOfTons; int noOfFifties;*/ String position; String country; playerDetails (String name, Date dob, int totalMatchesPlayed,String position,String country){ this.name = name; this.dob = dob; this.totalMatchesPlayed = totalMatchesPlayed; /*this.highestRunsScored = highestRunsScored; this.noOfTons = noOfTons; this.noOfFifties …

Member Avatar
0
12
Member Avatar

Hi, I'm new to vb and I need to record the time the user used a certain privilege and the time s/he finished using it. i used date/time picker but whenever i run the program, i can't edit the time. only the date. help please?

Member Avatar
0
23
Member Avatar

Hi All, i am here with a problem in file handling in java. i need to search all the files on system with extention *.fdr. which are not less den one day old. then i need to convert the selected file to csv which is perfomed by a command in dos(symanalyzer). then i need to attach the csv file to mail . can someone help me with the java code . i have done some R&D and found that i can use the method "lastModified()". Thanks and Regards Mukul

Member Avatar
0
9
Member Avatar

Hello guys, I am on my revision of my thesis and I am actually stuck on this thing. My thesis is Online Requisition of Document and the panel told me that when the student submits his/her request, the expected date or tentative date release of document will automatically display or popped out on the screen. The expected date of release will be inserted on the database. Now my problem is, I don't know how to do that. I don't find any reference about it. And the date of releasing should also depend on the working days of the university registrar …

Member Avatar
0
23
Member Avatar

Friends again problem with date function In my form there is a text field -txtDod- of Date type formated like "dd-MMM-yyyy" My input is also formated like "dd-MMM-yyyy" Now see my code Private Sub TxtDod_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case vbKeyReturn If Not IsDate(TxtDod) Then LblMsg = "Enter Date Of Deposit" TxtDod.SetFocus ElseIf (Format$(TxtDod.Text, "dd-MMM-yyyy")) > (Format$(Date, "dd-MMM-yyyy")) Then LblMsg = "Date Of Deposit Must Be <= Today" TxtDod.SetFocus Else TxtPrd.SetFocus End If End Select End Sub My problem is I want this-If the input date of TxtDod is greater than Current Date(Today's Date) the focus should not be …

Member Avatar
0
18
Member Avatar

Hi, I have 2 fields that are used for date. In my fucntion, i have it format the date into Y-m-d format, $purchase_date = mysqli_real_escape_string($mysqli,date('Y-m-d',$_POST['purchase_date'])); $warranty_end_date = mysqli_real_escape_string($mysqli,date('Y-m-d',$_POST['warranty_end_date'])); But when I enter a date into it, it just puts 0000-00-00 I thought this was the correct format, but seems to not work. I did try this as well: $purchase_date = mysqli_real_escape_string($mysqli, date('Y-m-d', strtotime(str_replace('-','/',$_POST['purchase_date'])); $warranty_end_date = mysqli_real_escape_string($mysqli, date('Y-m-d', strtotime(str_replace('-','/',$_POST['warranty_end_date'])); but didnt work either. Here is the form elements as well: <div class="form-group"> <label for="purchase_date">Purchase Date</label> <input type="text" name="purchase_date" class="form-control" id="purchase_date" placeholder="Purchase Date"> </div> <div class="form-group"> <label for="warranty_end_date">Warranty End Date</label> <input type="text" …

Member Avatar
0
9
Member Avatar

Hi there, I am using Libre Office Calc in my windows 8 PC. I need to maintain a calc sheet for tracking my home electricity meter reading. pLEASE LOOK THE IMAGE. FUNCTION OF CELL A2 = if c2 = "" then value = "" otherwise value = TODAY(). This will give me the date of the data entering day. I copied this function till A31 to record one month meter reading. When i enter the reading of febrary 1 is ok. A2 shows Feb 1 2014. But whe i enter reading of feb 2, both A2 and A3 are showing …

Member Avatar
0
9
Member Avatar

Hi I am trying to convert julian date in to date format. can any one please help me. **For Example:** Julian date - 114021 Output Should be as below 2014/01/21 - (YYYY/MM/DD)

Member Avatar
0
22
Member Avatar

Hi how can i comvert the string type for ex : 10/12/2012(d/m/Y) to date .. it changes date to month and month to date.. my expected format is d/m/Y format only...

Member Avatar
0
11
Member Avatar

Hello, I have one big XML file (600 MB - 850 MB) in format "**cells_yyyymmdd_hhmi.xml**" I would like to specify that everyday i will have new file with new date. So, *there should be general way to read it and cut it*. For exmaple, i have file of 7th January. Its, cells_20140107_154016 Goal is to split into small parts by shell script and do operation. It will be great if anyone can give input to check the filesize and if it is too big, make 4 parts instead of 3 parts. I did so far: head -1125000 cells_20140107_154016.xml > PART1.xml …

Member Avatar
0
19
Member Avatar

Hello, I have csv filename with date. Everyday i have same csv file with respective date. I need to read filename (*everyday date changes in filename*) and do operation. For example, I have file "**cells_20140106_165532.csv**". I did like this to read it in general: $filename = "cells_".date('Ymd_hmi').".csv"; $file_contents = file_get_contents($filename); $importcsvsql = ""; `//error: cells_20140114_110109.csv` It is taking current date instead of filename's date. It is generating empty file "*cells_20140114_110109.csv*" Thanks in advanced.

Member Avatar
0
26
Member Avatar

Hello, I have one "**tar.Z**" file. Objective is to unzip it by shell script and check the date. * archive: filename_20140103_1540.tar.Z #!/bin/bash cd $REP_DATAS/path u=$(date +%u) if [ ${u} -eq 1 ] ; then dateQ=`date --date='-3 day' +'%Y%m%d_%H%m'` else dateQ=`date --date='-1 day' +'%Y%m%d_%H%m'` fi tar xvf filename_"dateQ".tar.Z > error: > > tar: Error is not recoverable: exiting now THANKS IN ADVANCED.

Member Avatar
0
72
Member Avatar

Hello I have a Java Agent which I need to maintain (dev was done by someone else), with the following code samples extracted: String type = (String) types.nextElement(); DemByDate dd = (DemByDate) client.typeDemande.get(type); Vector v = (Vector) dd.demandes; Calendar calendar = Calendar.getInstance(); calendar.set(dd.d2.getYear(), dd.d2.getMonth(), dd.d2.getDate()); int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); dd.d2 = new Date(dd.d2.getYear(), dd.d2.getMonth(), maxDay); dd.d1 = new Date(dd.d1.getYear(), dd.d1.getMonth(), 1); XML("<ligne>"); XML("<typeBesoin>" + type + "</typeBesoin>"); XML("<nbre>" + v.size() + "</nbre>"); XML("<periodeDebut>" + format.format(dd.d1) + "</periodeDebut>"); XML("<periodeFin>"+ format.format(dd.d2) + "</periodeFin>"); XML("</ligne>"); class DemByDate { Vector demandes; Date d1; Date d2; } I need to replace the .getYear() and .getMonth() …

Member Avatar
0
14
Member Avatar

Hi everyone, Can I ask your suggestion? Please.. I got the problem in my query, about storing the Date into my database. When time I submit o saved the data inputed to my textfield , the query is okay, but when I checked the database the date it's not good(the date look like this '1/10/14 12:00:00' with time. in my C# form i customize the timepicker, I set to "Custom" w/o the time, in my database I set the Type to "DATE". I want time not include to save in the DB. Can everyone help me? the code that I …

Member Avatar
0
29
Member Avatar

how to insert date in table by using datepicker jquery? my jquery code is as: <script language="JavaScript" type="text/javascript"> $(function() { $( "#date" ).datepicker(); }); </script> in html <tr colspan="2"> <td valign="top" align="left"> Date<font color="red">*</font></td> <td valign="top" align="left"> <input type="text" id="date" name="date" value="" readonly="readonly" autocomplete="off" size="20"> </td></tr>

Member Avatar
0
14
Member Avatar

hello, i just want to find difference between two dates interms of days by getting dates as a user input. i tried getting user input using raw_input but it shows some erroe message. can anyone tell me the right coding for this one.urgent please...

Member Avatar
0
34
Member Avatar

I want to search data base by input date given by user in php my sql How to do it? Regards

Member Avatar
0
13
Member Avatar

We need it tomorrow, the code for the assignment #3 and #4 question. There was no continuation. Date Class Project (part #3) Add the following data items to your Date class 05 points 1. int dayOfYear 2. String monthName 3. String dayOfWeek Add the following methods to your Date class 10 points 1. public void calcDayOfWeek() Computes the day-of-the-week and stores the day of week String in the dayOfWeek data item. (depending in the month, day, and year data items) 2. public String getDayOfWeek() 05 points returns the day-of-the-week 3. public void calcMonthName() 05 points Finds the month name and …

Member Avatar
0
15
Member Avatar

Hi! I have in my database few tables and each table have a column with dates of inserting records. I don't know how to go through the database, through all tables, in chronological order, from the first inserted record until the last, can anyone help? tnx!

Member Avatar
0
22
Member Avatar

I have a query that starts like this... SELECT COUNT(A.FISH), COUNT(B.MEAT), COUNT(C.FRUIT).... now my problem is this, how could I count when I need to consider an expiration date for each column,...and the expiration dates varies for each column... Can I do this in one query? Or is there any other way I can do to consider the dates for each column?????..... Need clarification here... Thank you in advance....

Member Avatar
0
15

The End.