M*******r 发帖数: 522 | 1 User 输入start date/end date, 现在算出相差的天数.
*****************************************************
select (to_date('?','mmddyyyy')-to_date('?','mmddyyyy'))
from MY_TABLE
where due_date<=to_date('?','mmddyyyy')
AND due_date>=to_date('?','mmddyyyy')
*****************************************************
现在问题是前面的JSP只给pass两个parameter, 第一个是end date,第二个是start date.
怀疑如果这个sql就这样写的话,后两个"?"就得不到赋值. 也就是说,整段sql中只允许出
现两个"?". 请问如何把这个天数差算出来.
新手上路,请多指教. //bow |
|
w********r 发帖数: 253 | 2 和HR谈了,公司不给出有公司的employment verification letter,让去一个网站
www.theworknumber.com,然后产生Salary Key给需要这个employment verification
letter的人,说员工自己不能access self's income infomation
1. Access The Work Number either via the web or telephone:
•1-800-367-2884
•www.theworknumber.com
2. Select the Employee option and Login. To Login, have the following
information:
•Employer Code
•Your Social Security Number
•Your PIN (your date of birth --MMDDYYYY)
3. Select the "Create a Salary Key" o... 阅读全帖 |
|
M*******r 发帖数: 522 | 3 这么说吧,User Input, End_Date=01012006, Start_Date=01012004
JSP把这两个值赋给{ select (to_date('?','mmddyyyy')-to_date('?','mmddyyyy'))}
中的第一个问号和第二个问号,就应该能计算出这两个日期之间相差
多少天。
问题是,JSP只给两个值,而我的sql如果要照下面那样写的话会有4个问号。
where clause里面的两个问号是必须的 -- 这样就会导致后面两个问号无值
可赋。JSP是别人的,不可动,现在怎么求这个天数... |
|
B*****g 发帖数: 34098 | 4 我也试过了 to_char(to_date(t.d, 'mmddyyyy')+1, 'mmddyyyy'), 同样是递减的
没有 |
|
d**z 发帖数: 3577 | 5
I hereby [regrettably] resign from my present job
[for another, compelling, hard-to-turn-down opportunity,]
effective MMDDYYYY. |
|
|
W******l 发帖数: 430 | 7
just wrote you are working on company A from MMDDyyyy and salary is $xxx.
It would be ok.
Also sb. said you dont' need to provide the job verification letter, but i
provided ours. |
|
O*******d 发帖数: 20343 | 8 美国的日期的格式 mmddyyyy也是脑残。 从中间开始,往小日期晃一下,再跳到大日期
。 计算机要排序很麻烦。 最好排序的格式是yyyymmdd 20120108 或 2012-01-08,
字串自然就可以排序。 |
|
b****e 发帖数: 1275 | 9 no no no.. i am not asking for that.. i need a function that
translates epoch time (sec from jan 1 1970) to MMDDYYYY kind
of format. to_char doesn't work
thanks |
|
m******t 发帖数: 2416 | 10 【 以下文字转载自 magicfat 的信箱 】
【 原文由 xt 所发表 】
量很
.结
果出来的东西整天crash.最后连时间也成了泡影.到是我这写地没那么快的总能赶上deadl
Appearantly that means job security. haha
说我
hm... CE major, if well equiped with the mathematical ideas from CS, should be
idea for programming. I hate those CS people who have absolutely no idea of
standardization. Those people who think MMDDYYYY is good date format, for
example. hehe
BTW, I pushed the wrong button, that's why it went to your mailbox. :) |
|