July 29th, 2009 |
mylinh |
Question:
Hi,
I wondering if someone can help me as im a complete newbie
Ive upsized a database from access to sql 2000 and i had a bit of code written in vb that once i changed a particular field in a table it automatically inserted todays date into another field, i know it still works [...]
July 29th, 2009 |
mylinh |
Question:
This is strange.
I have a report that’s based on Sales.
The report has Grouping on Date.
The Group On property is set to Week.
The report is from Friday 12/1/2006 through Sunday 12/31/2006.
The underlying table has sales in every weekday of the month.
There is no problem with the grouping – the report shows and counts the sales correctly [...]
July 29th, 2009 |
mylinh |
Question:
I am trying to make some crosstab queries that are using (as a part of the query) parameters taken from one or more DatePicker controls. However, in each instance I try this I get the following error: The MS Jet Engine database does not recognize ‘Forms!frmReportGenerator!DTPicker0′ as a valid field name or expression.
The orignal query [...]
Question:
I want to rename and move a group of files every night with a bat file. for example: i have a vendors.csv file that is created every night at 3 am. I want to rename this file to vendors02052007.csv and move this file to a history folder for archival. i can create a bat [...]
July 27th, 2009 |
mylinh |
Question:
I have a field that is type number and is displayed like 200610. I need to turn it into a date field so the query can run off the system date. I tried using to_date and got “ORA-01861: literal does not match format string”. How can I convert that field so I can perform date [...]
July 27th, 2009 |
mylinh |
Question:
I am looking for a small function to calculate the business days in the month.
We work 6 instead of 5 days a week M-S.
Basicly I need to calculate the total business days in the current month and calculate the business days to date in current month.
Solution:
$daysThisMonth = date(‘t’, $theDate);
$todaysDate = date(‘d’, $theDate);
$weekdayOfFirst = date(‘w’, mktime(0,0,0,date(‘n’, [...]
July 26th, 2009 |
mylinh |
Question:
I am selecting off data from table based off a
date range.
the entry_dt field is not stored as a datefield but as regular char.
When I run the below select, the results work great for a date range of 01/01/06 thru 12/31/06. The output has 01/2006 with the count first …thru 12/2006. Which I think plot onto [...]
July 26th, 2009 |
mylinh |
Question:
I have a table:
tblTaken
MemberID
SessionNo
CompletedDate
I’ve figured out how to find the most recent CompletedDate… but the query returns only the two MemberIDs of the the people who completed the Session on the most recent Date:
SELECT tblTaken.MemberID, tblTaken.SessionNo, tblTaken.CompleteDate
FROM tblTaken
WHERE (tblTaken.CompleteDate)=(select Max(CompleteDate) from tblTaken);
but what I need is the most recent CompleteDate for EACH MemberID… I’ve tried [...]
July 25th, 2009 |
mylinh |
Question:
This should be a no-brainer for all you experts out there. I didn’t even think I would have to post this question as I become more familiar with PHP, but I was wrong…. Here goes:
I have these lines:
<?php
$rpt_date=’2006-12-26′;
echo “<p>Date: “.$rpt_date;
echo “<p>Day of Week: “.date(‘w’,$rpt_date).”</p>”;
echo “<p>Day Name: “.date(‘l’,$rpt_date).”</p>”;
This is the output:
Date: 2006-12-26
Day of Week: 3
Day Name: [...]
Question:
Users can input any date string, such as “01-31-2007″
and $date = $_POST['date_in'];
But for inserting into MySQL, I want to change it into “2007-01-31″.
I tried this:
$Task_Date = date(“Y/m/d”,strtotime($date));
But it always shows “1969-12-31″ regardless of what the input was.
What am I doing wrong?
Solution:
Then use:
list($m, $d, $y) = explode(‘-’, $date);
$Task_Date = $y.’-’.$m.’-’.$d;
-r-