Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6828079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:20:28+00:00 2026-05-26T22:20:28+00:00

i have this def day1 =1 def month1 = 10 def year1 = 111

  • 0

i have this

    def day1 =1
    def month1 = 10
    def year1 = 111
    render "a"

    def date1 = new Date(year1 ,month1, day1);

the output is

    Sat Oct 01 00:00:00 PKT 2011

the date is fine , but can i remove this time format and country symbol i.e 01 00:00:00 PKT?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:20:29+00:00Added an answer on May 26, 2026 at 10:20 pm

    You can not “remove” it, TimeZone and Time are always part of the Date object. You can, though, print just the date portion.

    groovy> def day1 =1 
    groovy> def month1 = 10 
    groovy> def year1 = 111 
    groovy> def date1 = new Date(year1 ,month1, day1); 
    groovy> print(date1.getDateString()) 
    groovy> print("\n") 
    groovy> print(date1.format("yyyy-MM-dd")) 
    
    11/1/11
    2011-11-01
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this class MainController { def test = { def day1 =1 def
Let's say I have this code: class class1(object): def __init__(self): #don't worry about this
I have this code: def paintEvent(self, paintEvent): self._painter.begin(self) try: while True: color, rectangle =
I have this code: def method_a(self): command_line = 'somtoolbox GrowingSOM ' + som_prop_path subprocess.Popen(shlex.split(command_line))
I have this : def steps(ns): return [random.choice([[0, 1], [1, 0], [0, -1], [-1,
I have this code in a Grails 1.0.4 Groovy console: def devices = Device.getAll()
in views.py I have this: def logout(request,key): auth.logout(request) return HttpResponseRedirect(reverse('airAgency.views.index',args=[key])) in index template i
I have this method: def get_user_info(self): month = choice(range(1,13)) day = choice(range(1,29)) year =
I'm have this function: def ngrams(word): for i in range(1, len(word) + 1): yield
I have a model (Project), in the 'new' action I have this code <h1>Create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.