dzisiaj jest <b>!{$smarty.now|date_format:"%Y-%m-%d"}!


select NOW()::date

„2010-04-23″

select t_date from table where t_date >= NOW()::date+’1 day’::interval order by t_date limit 3

„2010-04-24″
„2010-04-24″
„2010-04-24″

select t_date from table where t_date >= NOW()+’1 day’::interval order by t_date limit 3

„2010-04-25″
„2010-04-25″
„2010-04-25″


select t_add_date, SUBSTRING(t_add_date::character varying, 1, 19) from table where t_add_date < NOW()-'1 DAY'::interval
t_add_date substring
2010-03-10 21:26:49.928445 2010-03-10 21:26:49
2010-03-10 21:26:49.928445 2010-03-10 21:26:49


select * from table where t_add_date < NOW()-’5 MONTH’::interval
select * from table where t_add_date < NOW()+’5 MONTH’::interval
select * from table where t_add_date < NOW()-’1 DAY’::interval
select * from table where t_add_date < NOW()-’2 DAYS’::interval

select * from table where t_add_date < NOW()-’1 DAY’::interval
select * from table where t_add_date < NOW()-’5 MINUTES’::interval

select * from table where t_add_date < NOW()-’3 HOURS’::interval


echo date(‘H:i:s’, strtotime(‘now’)) . ‘<br>’;
echo date(‘Y-m-d’, strtotime(„+2 days”)) . ‘ ‘ . date(‘H:i:s’, strtotime(‘now’)) . ‘<br>’;
$task_dateend = date(‘Y-m-d H:i:s’, strtotime(date(‘Y-m-d’, strtotime(„+2 days”)) . ‘ ‘ . date(‘H:i:s’, strtotime(‘now’))));
echo $task_dateend;

Wynki:
2009-07-25 14:02:51


dir = "d:\tmp\"
dir2 = "e:\temp\"
Set fso = CreateObject("Scripting.FileSystemObject")
czas = Now()
ex = Year(czas) & Month(czas) & Day(czas) & Hour(czas) & Minute(czas) & Second(czas)
dir_ex = dir2 & ex
fso.CreateFolder(dir_ex)
fso.CopyFolder dir & "*", dir_ex
set fso = nothing