Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


current date,time

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DB2 SQL - DB2 PROGRAMMING
  View previous topic :: View next topic  
Author Message
amar
Member


Joined: 07 Oct 2006
Posts: 4

PostPosted: Sat Oct 07, 2006 10:13 am    Post subject: current date,time Reply with quote

can n e 1 plz tell me , how to take current date and current time in db2 queries

also how to autogenerate ...............
Back to top
View user's profile Send private message

ovreddy
Member


Joined: 07 Oct 2006
Posts: 14
Location: Chennai

PostPosted: Sat Oct 07, 2006 4:17 pm    Post subject: Reply with quote

---------+---------+---------+---------+---------+---------
SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1;
---------+---------+---------+---------+---------+---------

---------+---------+---------+---------+---------+---------
10/07/2006
DSNE610I NUMBER OF ROWS DISPLAYED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100
---------+---------+---------+---------+---------+---------
SELECT CURRENT TIME FROM SYSIBM.SYSDUMMY1;
---------+---------+---------+---------+---------+---------

---------+---------+---------+---------+---------+---------
07.12.29
DSNE610I NUMBER OF ROWS DISPLAYED IS 1
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
ambilileela
Member


Joined: 06 Jun 2006
Posts: 11

PostPosted: Tue Oct 24, 2006 11:23 am    Post subject: Reply with quote

Hi

To add to it you can get the current timestamp by giving

SELECT CURRENT TIMESTAMP
FROM SYSIBM.SYSDUMMY1


********************************* Top of Data ***************
---------+---------+---------+---------+---------+---------+-
SELECT CURRENT TIMESTAMP
FROM SYSIBM.SYSDUMMY1
---------+---------+---------+---------+---------+---------+-

---------+---------+---------+---------+---------+---------+-
2006-10-24-01.24.48.381162
DSNE610I NUMBER OF ROWS DISPLAYED IS 1
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100


Thanks,
Ambili
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DB2 SQL - DB2 PROGRAMMING All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Sort report writer queries 5 jathampy 627 Tue Mar 30, 2010 10:35 pm
jathampy View latest post
No new posts Multiple Select Queries vs Single Join Query 1 csailor 678 Fri Dec 04, 2009 1:00 pm
Anuj Dhawan View latest post
No new posts SQl Queries on Duplicates values 7 vishu1484 935 Thu Aug 13, 2009 2:49 pm
Anand_Hakke View latest post
No new posts EZtrv+ - Is there a way to suppress ez-code from printing... 4 seagreg 3644 Wed Feb 04, 2009 10:47 am
md_shamsu View latest post
No new posts can u tell me Alternative for COMMAREA ? 1 Abhiyanta 1571 Mon Jul 10, 2006 10:49 am
arrbee View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB