I am working with PHP and an Access database through ODBC, and want to format date 2006-02-20 to 02/20/2006.?
147561
You could use the split function to get each part of the date and re format it as you want :\n\nie\n\n<?php\n// Delimiters may be slash, dot, or hyphen\n$date = "04/30/1973";\nlist($month, $day, $year) = split('[/.-]', $date);\necho "Month: $month; Day: $day; Year: $year<br />&#92;n";\n?>\n\nSource --> http://uk2.php.net/split\n\nAs for connecting to the database using odbc etc , I have never done that , Just search on google, there are plenty of examples.\n\nGoogle is your friend :)
650739
Well, this depends on what format you have the date saved in in $mydate.  If it is a Unix timestamp, you can use the date() function, which has a number of flags you can specify for formatting the date string:\n\nhttp://us2.php.net/date\n\nIf you have the date already in a string format, you can convert it to a Unix timestamp using the strtotime() function:\n\nhttp://us2.php.net/manual/en/function.strtotime.php\n\nAnd then convert it back to a string format in whatever format you want, using date(), as above.
365789
I cannot understand your question clearly.\n\nI assume that you have to show an alert before 20 days of a fixed date.\n\nLet fixed date be 1/6/06\n\ndim i as integer\ni=date\n\nNow i will contain the current date of the system.\n\nYou can compare it with the fixed date and show the message box.\n\nHope this is useful.\n\nDo contact me in person on doubts in VB6 and VB.NET through mail.
780343
If you are in VBA in MS Access? Than you can cut the string and used the variable directly and then finish the string.\n\nstudTbl.Open "SELECT * FROM [studlst] where ([no]=" & i &")"
396944
Access 97 supports only limited SQL queries. Most of these can be generated with the query designer functionality in Access, but if you want to access the database using more advance SQL commands, try writing a VB program to do it and use an OLEDB jet connection. Then you get whatever functionatily you want on it.\nGood luck!
1059497
Select * from employee_master_table where employee_name like '%%entered_employee_name%%'\n\ncheers !!!!\n\nHello Mate,\n\nI program in PHP. below is a sample code form PHP, maybe this would be of some help to you.\n\n<?\n\n\n$user="ISAdmin";\n@$password="********";\n@$database="my_DB";\n@mysql_connect(localhost,$user,$password) or die ("could not connect to database");\n@mysql_select_db($database);\n\n$query = "select * from my_DB";\n\n$result = mysql_query($query);\n\n$num=mysql_numrows($result);\n\necho "<p>$num records found!!!!";\n\n$i=0;\nwhile ($i < $num) \n\n{\n\n$tmpid=mysql_result($result,$i,"dataid");\n/*($result,$i,"dataid")\n$tmpname=mysql_result($result,$i,"databname");\n/*($result,$i,"databname")\n\n$savetofile=  "<p><a href=&#92;"index.php?transtype=$transid&data=$tmpid&#92;"> $tmpid   $tmpname </a>";\n\necho $savetofile;\n\n$i++;\n\n}\n\n\n$delthis = $_GET['data'];\n\nif($delthis<>"")\n{\n\n\n$query = "select from my_DB where dataid=&#92;"$delthis&#92;"";\n\n$tmpid=mysql_result($result,$i,"dataid");\n\n$tmpname=mysql_result($result,$i,"databname");\n\n\n<form>\n<input type= text" name="text1" value="<?echo $tmpid?>"?\n<input type= text" name="text2" value="<?echo $tmpname?>"?\n</form>\n\n@mysql_close();\n}\n\n?>
561840
Use SimpleDateFormat or DateFormat convert the date object to whatever format u want.\n\nHere is a sample using DateFormat\n\nimport java.text.DateFormat;\nimport java.util.Date;\n\npublic class DateFormatExample1 {\n\n    public static void main(String[] args) {\n        // Make a new Date object. It will be initialized to the current time.\n        Date now = new Date();\n\n        // See what toString() returns\n        System.out.println(" 1. " + now.toString());\n\n        // Next, try the default DateFormat\n        System.out.println(" 2. " + DateFormat.getInstance().format(now));\n\n        // And the default time and date-time DateFormats\n        System.out.println(" 3. " + DateFormat.getTimeInstance().format(now));\n        System.out.println(" 4. " + \n            DateFormat.getDateTimeInstance().format(now));\n\n        // Next, try the short, medium and long variants of the \n        // default time format \n        System.out.println(" 5. " + \n            DateFormat.getTimeInstance(DateFormat.SHORT).format(now));\n        System.out.println(" 6. " + \n            DateFormat.getTimeInstance(DateFormat.MEDIUM).format(now));\n        System.out.println(" 7. " + \n            DateFormat.getTimeInstance(DateFormat.LONG).format(now));\n\n        // For the default date-time format, the length of both the\n        // date and time elements can be specified. Here are some examples:\n        System.out.println(" 8. " + DateFormat.getDateTimeInstance(\n            DateFormat.SHORT, DateFormat.SHORT).format(now));\n        System.out.println(" 9. " + DateFormat.getDateTimeInstance(\n            DateFormat.MEDIUM, DateFormat.SHORT).format(now));\n        System.out.println("10. " + DateFormat.getDateTimeInstance(\n            DateFormat.LONG, DateFormat.LONG).format(now));\n    }\n}
1017879
'declare variable\nDim cdate as DateTime\ncadte=System.DateTime.Now\n\n'declare variables\nDim dd as Integer, mm as Integer, yy as Integer\n\n'get the day value\ndd=cdate.Day\n\n'get month value\nmm=cdate.Month \n\n'get year value\nyy=cdate.Year
743627
I would use Microsoft office Access package, it is a date base.  Just take time to organise which titles you need, it is fairly simple to operate, and can be updated very easily.
555416
ANSWER: Simplest php solution:\n\n$days = date('j', $date1 - $date2);\n\nSOURCE:  GREAT source on php date functions! Virtually everything you wanted to know about php date time functions.\n\nhttp://us2.php.net/date
10408
for this u can do one thing thatu will go database menu and click show sql query and add where\n 'Field name ' = today or now as per as ur requrement.
70671
I believe you can right click on it and select properties.  It gives a "created" date (that I don't believe is accurate -- just tried that with a website I administer) and a "last modified" date (which was accurate on that one).
858844
you need to check what kind of values you are receiving as a recordset first if you are finding it difficult to access the values. echo the result set as follows\n\n<?php echo $queryResult['columnName']; ?>\n\nyou can loop through the values by using a do-while loop by following\n\n<?php\ndo {\necho $queryResult['columnName']; \n} while (mysql_fetch_assoc($queryResult));\n?>
248642
Your best bet is probably to use Perl and the Date::Calc module
891022
error in your first line:\n\nchange\n\n$currentmonth = $_GET['$d']; \n\nby\n\n$currentmonth = $_GET['d'];
87706
Tuesday, February 28th, 2006\n\n02/28/06
721930
echo date("Y-m-d",strtotime("+5 days"));\n\necho date("Y-m-d",strtotime("+21 days"));