일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- MSSQL
- aspnet
- 엑셀
- javascript
- MS
- 자바스크립트
- 프로시저
- DataGrid
- SSRS
- 비주얼스튜디오
- 리포팅서비스
- Winform
- ASP
- 마이크로소프트
- c#
- 윈폼
- 단축키
- 윈도우
- microsoft
- replace()
- 오라클
- IIS
- CONVERT()
- Excel
- 태그를 입력해 주세요.
- oracle
- attr()
- jQuery
- 이클립스
- windows
- Today
- Total
목록substring() (4)
DJ메탈짱™의 Free Style
-- SQL Server string to date / datetime conversion - datetime string format sql server-- MSSQL string to datetime conversion - convert char to date - convert varchar to date-- Subtract 100 from style number (format) for yy instead yyyy (or ccyy with century)SELECT convert(datetime, 'Oct 23 2012 11:01AM', 100) -- mon dd yyyy hh:mmAM (or PM)SELECT convert(datetime, 'Oct 23 2012 11:01AM') -- 2012-1..
-- 소수점 한자리SELECT SUBSTRING( CONVERT( VARCHAR, CONVERT( MONEY, '19001.2' ), 1 ), 1, LEN(CONVERT( VARCHAR, CONVERT(MONEY, '19001.2' ), 1 )) - 1 ) -- 소수점 두자리select CONVERT(varchar, convert(money, '1000000.2'),-1) -- 소수점 이하 제거 (Substring)SELECT SUBSTRING( CONVERT( VARCHAR, CONVERT( MONEY, '19001.2' ), 1 ), 1, LEN(CONVERT( VARCHAR, CONVERT(MONEY, '19001.2' ), 1 )) - 3 ) -- 소수점 이하 제거 (Replace) SELECT ..
/****** 개체: UserDefinedFunction [dbo].[fnCharToDate] 스크립트 날짜: 06/13/2008 10:01:19 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /* * 함수명 : fnCharToDate * 설명 : varchar 날짜값을 날짜 포맷으로 변환 * * input : * @CHARDATETIME : 날짜문자열 * * 작성자 : 최보현 * 최초작성일 : 2008.06.12 * 최종수정자 : * 최종수정일 : * * 사용예 : select dbo.fnCharToDate('20080220123456')*/ CREATE FUNCTION [dbo].[fnCharToDate] ( @CHARDATETIME char(1..