Week number extraction of Dreamweaver MX
My form collects a date (that the user gets a pop-up calendar). This date is subject to a field (datBegin) in the MySQL database. Fine.Currently a quote of this date, I want a part of it (the "week-number" represented by the date on which the user has entered) to be submitted to another field (week_nbr) in the same MySQL database and a table.
In other words, the user inserts the date once. When he clicks on send, the date (like 2007-5-17) is placed in the datBegin field, and the number of the week (like 20) must be placed in the week_nbr field.
The formatting of the week number is not a problem. 'S done it with DATE_FORMAT (datBegin, '%u'). But the presentation of it to the database, that's what I'm not able to accomplish. The date and number of the week are of course part of the same record (row).
If anyone can help, I would be very happy. (I'm running out of things to try!) Most of my attempts have been to create a value for week_nbr in a hidden field. I also tried the DATE_FORMAT recordsets. None of this has been successful in obtaining a value of week_nbr (based on the just datBegin) stored in the MySQL database.
I use PHP and working with Dreamweaver MX.
curtgus wrote:
> Here's where I'm sure:
>
> $insertSQL = sprintf ("INSERT INTO kalendar (datBegin, week_nbr, tid, mote,
(> comment) VALUES (%s, %s, %s, %s %s) ",)
> GetSQLValueString($_POST['datBegin'], "date").
> GetSQLValueString($_POST['week_nbr'], "date").
> GetSQLValueString($_POST['tid'], "date").
> GetSQLValueString($_POST['mote'], "text").
(> GetSQLValueString ($_POST ["' comment"], "text"));
Change the section above for this:
$insertSQL = sprintf ("INSERT INTO kalendar (datBegin, week_nbr, tid,
Mote, comment) VALUES (%s, DATE_FORMAT(%s,'%%u'), %s, %s %s) ",)
GetSQLValueString ($_POST ['datBegin'], 'day'),
GetSQLValueString ($_POST ['datBegin'], 'day'),
GetSQLValueString ($_POST ['tid'], 'day'),
GetSQLValueString ($_POST ["'mote"], "text").
GetSQLValueString ($_POST ["' comment"], "text"));
Basically, you just add the DATE_FORMAT()) around the second s % and the value
the second argument of GetSQLValueString() to accept $_POST ['datBegin'].
Because the sprintf() function interprets the sign of percentage as a PHP format
specifier, you must escape the percent "%u" like this sign: ' % u'.
--
Adobe Community Expert David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Tags: Dreamweaver
Similar Questions
-
The week of Julian to the calendar week number
Hi Experts,
Could if it you please let me know the syntax to convert a number of week of Julian calendar week number. Thanks in advance
Thank you and best regards,
Karthik R
As shown Etbin, you must do it in two steps. First, you convert "Julian Week" to a date data type that belongs to that same week.
When you have that, you can use the full power of the format mask oracle to extract everything you need.
Oracle got two different masks for weeks.
- IW = ISO week
- WW = common (julian?) week.
As you know, the year can also change, so there is a mask of the year YYYY and a mask of year IYYY ISO.
Back to your problem, if the conversion tip 351006 * 7 fits your needs as a week of julian to date, so I think that the solution is good.
with week_to_date as (select to_date(351006 * 7, 'J') my_day from dual) select to_char(my_day, 'Day DD/MM/YYYY') my_day, to_char(my_day, 'WW-YYYY') julian_week, to_char(my_day, 'IW-IYYY') ISO_Week from week_to_date;
Monday, January 19, 2015 03-2015 04-2015 -
Week number reverse lookup.
I got help with this in the past and I had someone help create a week number based on my work system.
If I know the number of week can I use it to search for the week commencing the date?
So, for example, we are in week 1 (Wednesday 24 August 2016 13:33:27) if I enter week 1, can I do theStart theweek set to 'Monday 22 August 2016 at 00:00:00 '?
set thisDate to current date set theweekNumber to ((thisDate - (my augustThirdWeek(thisDate))) div 604800) on augustThirdWeek(d) -- get the third monday of August copy d to tDate tell tDate set {its day, its month, its time} to {15, 8, 0} -- start at August 15 repeat 2 times repeat while (its weekday) is not Monday set its day to (its day) + 1 -- add one day (range 16 ... 21) end repeat if d < it then -- this date is older that the third Monday of August set {its day, its year} to {15, (its year) - 1} -- subtract one year else return it end if end repeat end tell end augustThirdWeek
Use the following syntax:
the value of to date the_date 'Wednesday 24 August 2016 13:33:27.
the value of {the_date hours, minutes from the_date, the_date seconds} to {0, 0, 0}
the_date the_date - (((day of the_date) - Sunday) value * 3600 * 24)
(144218)
-
Convergence 2u5 - how to get the ISO week number in calendar view?
Hello
Convergence seems to be displaying week numbers "US Standard" (e.g. 27/02/2013 is week 8).
I don't see any option to display European/ISO week numbers (27/02/2013 is week * 9 *).
You can test on this page: http://www.onlineconversion.com/day_week_number.htm
Tested with 2u5 and Convergence 2u4.
Technically, Convergence depends currently dojo to calculate WeekNumber (kernel.js called dojo.date.locale.format that calls dojo.date.locale._getWeekOfYear which uses US Standard).
The dojox.date.posix.getIsoWeekOfYear method can be called to get the ISO week number.
EDIT: ok, known problem.
https://support.Oracle.com/epmos/faces/UI/km/BugDisplay.JSPX?ID=15920988
And:
https://support.Oracle.com/epmos/faces/UI/km/SearchDocDisplay.JSPX?_afrLoop=358252901368927 & type = document & ID = 1508601.1 & DisplayIndex = 1 & _afrWindowMode = 0 & _adf. CTRL-State = hy91faqhm_93
Published by: user13722792 on 27 Feb. 2013 02:03Yes, we talk about behavior. However, demand for next development was opened on this:
15920988 DO WEEK NUMBERING CUSTOMIZABLE IN CONVERGENCE
More on that we can read in the document of knowledge:
The numbering of the week in the calendar week view is inconsistent with the ISO8601 (Doc ID [1508601.1 | https://support.oracle.com/rs?type=doc&id=1508601.1])It also contains a customization to get Convergence use week numbering.
If you want to be officially added to the demand of development, you need to open a Service request, which contains this application.
Cheers, Ben
-
How can I get the current week number?
Try this
Select to_char (sysdate, 'IW') AS 'WEEK OF the YEAR' twicehttp://nimishgarg.blogspot.com/2010/11/Oracle-some-important-date-queries.html
-
How to get the name of the month of week number
Hi gurus,
I have week a year numbers.
I want to get the name of the month using the number of the week.
Is it possible to do this by using SQL.
Help, please.
Thank you
DominicSQL> var week number SQL> var year number SQL> SQL> begin 2 :year := 2007; 3 :week := 30; 4 end; 5 / PL/SQL procedure successfully completed. SQL> select to_char(trunc(to_date(:year,'yyyy'),'iyyy') + :week * 7, 'Month') month from dual 2 / MONTH --------- July SQL>
-
How can I get the number of week a week of prasent using simpleDateFormat class?
With regard to:
Jitendra.Balla
GetWeekOfYear DateTimeUtilities (calendar, long date, int firstDayofWeek)
-
What is the week number given by the function "week"?
Just by using the function 'week' which gives 2 number of the week for Monday January 4 which is false.
According to the ISO standard, number one week is the week containing January 4.
Kind regards
Stone.
Yes, ColdFusion week numbering system is different from the standard ISO date. For example, in ColdFusion, the week starts on Sunday. Whereas in the ISO standard, it begins on Monday.
There is nothing wrong with that. The ISO standard is a convention and is not required
-
Using the extraction with Dreamweaver tool (was: excerpt from Dreamweaver)
The evening
I have tried to familiarize themselves with the extraction tool, but simply do not "do".
I imported my PSD but I don't understand, how to retrieve information, such as background images - do I need a HTML empty. the video I have bene watch Adobe shows a created pre HTML with DIV tags...
If anyone can point me in the right direction that would be most appreciated, thanks
Perhaps this excerpt in Dreamweaver CM³ makes more sense.
-
query to get week number Pls help
I need to get the number of the week of the current year in the format 2008-W47 (this applies to sysdate
When I try
Select to_CHAR (sysdate, 'YYYY' |'-IW')
OF THE DOUBLE
I get 2008-47
but in the format 2008-W47
Help
sSQL> select to_CHAR(sysdate,'YYYY')||'-W'||to_char(sysdate,'IW') from dual 2 / TO_CHAR( -------- 2008-W47
-
Help!
Hello
If you are talking long shots of work, current version of DreamWeaver doesn't have function of work plans in favor.
I hope that in the next updates to DW, this function will work for you.
Thank you
Lalita
-
Serial number on 2004, dreamweaver MX EDU will not work
I have a new computer laptop lattitude, the software loaded fine, but I'm unable to activate using my serial number
See the following (found via Google search):
http://helpx.Adobe.com/x-productkb/policy-pricing/Macromedia-legacy-activation-error.html
-
How to get the ISO week number week start date
Hello
I have a table with the following structure
I was hoping to get something like select year, error, week 1 | "Start date of the week which is a Monday of this week" ", semaine2:" " Earlier this week, Monday again ",... table week53"Year error Week1 week2 week3 ......week53 2012 error1 2 4 2 1 2012 error2 3 0 1 1
Any suggestions please?
Thank you
SunHi, the Sun,
To see what a week N started, add 7 * (N - 1) days of the beginning of the year. (By definition, the beginning of the ISO year is the beginning of week 1 of the ISO year.)
To see when the week started 22 of the current year:
SELECT TRUNC (SYSDATE, 'IYYY') + (7 * (22 - 1)) FROM dual ;
I hope that answers your question.
If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
Explain, using specific examples, how you get these results from these data.
Always tell what version of Oracle you are using.
See the FAQ forum {message identifier: = 9360002} -
Hello
I'll try to find the week of the month and the day of the week by
Select to_char(sysdate,'w') and to_char(sysdate,'d') of the double that gives me 1 (week) and 2 (day of the week)
sysdate is Jan 05,2009.
For to_char (sysdate, 'w') it takes 1 Jan as the 1st day of the week and so to sysdate Jan 05,2009 it is show week 1.
But you do not have to to_char(sysdate,'d') that the output should be 5
Or, if it appears to_char(sysdate,'d') such as sysdate then 2 Jan 05,2009 should come in 2nd week.
Sorry, it's perhaps a stupid question for you guys but I'm new on this and all my calculations do not go.
Help, please...
Concerning
SagarTry user format ISO week 'IW' as
SQL> select to_char(sysdate,'iw') , to_char(sysdate,'d') from dual 2 SQL> / TO T -- - 02 2 SQL>
-
Formula need to count cells based on the number of week
I have a table used to track dates of contact with a client. A column calculates the WEEKNUM of the date of contact.
Week NUM
Date
First name
2
04/01/2016
Amanda
3
16/01/2016
Robert
4
17/01/2016
Rosie
6
01/02/2016
John
6
02/02/2016
Soledad
9
21/02/2016
Charles
9
24/02/2016
Mary
9
25/02/2016
Quince
12
17/03/2016
Bob
12
17/03/2016
Donald
14
03/31/2016
Cathy
14
01/04/2016
Shanna
19
02/05/2016
Laura
I need to report the number of contacts per week, so I mounted a second table with the week number in the first column. Each line corresponds to the number of week. I'm trying to use the function of COUNTIES to count the number of contacts in which the number of the week of the first table is equal to the week of the second table, but I can't get it to work. Is there a way to do this?
Week NUM
Number of contacts
expected outcome of the formula
1
0
2
1
3
1
4
1
5
0
6
2
7
0
8
0
9
3
10
0
11
0
12
2
13
0
14
2
15
0
16
0
17
0
18
0
19
1
20
0
Never mind. I'm a fool. COUNTIF does it, and I'm stuck trying to make COUNTIF work.
Maybe you are looking for
-
Hi all I'm ready to buy a Mac Pro opportunity and after reading some and asking around it seems that the core Westmere 5.1 2012 6 is a very good model. However, I saw a 2009 model which has been upgraded to be a 5.1. Is there a difference between a t
-
Satellite 1800-400: need new motherboard
Hello I have a Toshiba Satalite 1800-400 it is about 4 years old and is under warranty, but I know there's a problem with the motherboard to irreparable. Since I didn't know this problem I tried to source a replacement, does anyone know where I could
-
I can not anymore my system Vista updated windows since a requested download update Norton 2010
Hello.. I can not download updates for my windows vista... the alert lights, but I go to the windows Security Center and try to turn on the automatic update but... I get security center cannot get the message settings of update of security... everyth
-
location code product key my label disappeared
location code product key my label disappeared The other post: my label is gone I have no box or cd for location code product key
-
Error - Cannot open because the hal.dll file is missing at startup of Windows.
Original title: Hal.dll missing. When I turned on my comp., he said he could not open because the hal.dll file is missing. File downloaded from another computer of zip drive and plugged in, but nothing happened. Now what?