Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 366 Pomógł: 0 Dołączył: 2.01.2007 Ostrzeżenie: (0%)
|
hej - mam do Was pytanie o timestamp - normalnie wyswietla mi np:
2010-12-22 10:35:09.205 czy jest mozliwosc - po stronie postgresa abym wyciagala te date bez ms? czyli bym miala: 2010-12-22 10:35:09 pozdrawiam, misty |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Moderatorzy Postów: 36 561 Pomógł: 6315 Dołączył: 27.12.2004 |
Wiesz, tam na stronie nie ma dokladnie takiego przykladu jak ty chcesz, ale masz np. przyklad:
to_char(current_timestamp, 'HH12:MI:SS') ciezko analogicznie do tego przykladu dopisac jeszcze datę, majac tą tabele: Cytat HH hour of day (01-12) HH12 hour of day (01-12) HH24 hour of day (00-23) MI minute (00-59) SS second (00-59) MS millisecond (000-999) US microsecond (000000-999999) SSSS seconds past midnight (0-86399) AM or A.M. or PM or P.M. meridian indicator (uppercase) am or a.m. or pm or p.m. meridian indicator (lowercase) Y,YYY year (4 and more digits) with comma YYYY year (4 and more digits) YYY last 3 digits of year YY last 2 digits of year Y last digit of year IYYY ISO year (4 and more digits) IYY last 3 digits of ISO year IY last 2 digits of ISO year I last digits of ISO year BC or B.C. or AD or A.D. era indicator (uppercase) bc or b.c. or ad or a.d. era indicator (lowercase) MONTH full uppercase month name (blank-padded to 9 chars) Month full mixed-case month name (blank-padded to 9 chars) month full lowercase month name (blank-padded to 9 chars) MON abbreviated uppercase month name (3 chars) Mon abbreviated mixed-case month name (3 chars) mon abbreviated lowercase month name (3 chars) MM month number (01-12) DAY full uppercase day name (blank-padded to 9 chars) Day full mixed-case day name (blank-padded to 9 chars) day full lowercase day name (blank-padded to 9 chars) DY abbreviated uppercase day name (3 chars) Dy abbreviated mixed-case day name (3 chars) dy abbreviated lowercase day name (3 chars) DDD day of year (001-366) DD day of month (01-31) D day of week (1-7; Sunday is 1) W week of month (1-5) (The first week starts on the first day of the month.) WW week number of year (1-53) (The first week starts on the first day of the year.) IW ISO week number of year (The first Thursday of the new year is in week 1.) CC century (2 digits) J Julian Day (days since January 1, 4712 BC) Q quarter RM month in Roman numerals (I-XII; I=January) (uppercase) rm month in Roman numerals (i-xii; i=January) (lowercase) TZ time-zone name (uppercase) tz time-zone name (lowercase) Czy to naprawdę wszytko musi byc dokladnie tak jak Twoj problem? No juz odrobiny myslenia nie mozna dorzucic? |
|
|
|
misty timestamp bez milisekund 22.12.2010, 11:54:55
nospor Nie uzywam tej bazki, ale minuta googlowania daje ... 22.12.2010, 12:02:28
misty odwiedzilam dokladnie te stronie nim tu naskrobala... 22.12.2010, 12:09:05
misty Po pierwsze - dzieki za Twoj wysilek, ale ja juz t... 22.12.2010, 12:23:43
wookieb Chryste panie przenajświętszy
[SQL] pobierz, plain... 22.12.2010, 12:25:54
nospor CytatPo drugie - co forum to kazdy, ale to kazdy -... 22.12.2010, 12:27:38
misty [SQL] pobierz, plaintext SELECT to_char((S... 22.12.2010, 12:41:20
phpion Ale kombinujecie hehe. Wystarczy ustawić precyzję ... 23.12.2010, 13:34:29
cojack Najprościej jak się da to:
[SQL] pobierz, plainte... 3.01.2011, 10:12:36 ![]() ![]() |
|
Aktualny czas: 27.12.2025 - 11:09 |