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 6790841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:46:26+00:00 2026-05-26T17:46:26+00:00

i have a situation here where i need to pass the date as sysdate

  • 0

i have a situation here where i need to pass the date as sysdate of db from the .net code using the Nhibernate here goes my code

 OfflineStatusChangeMonitor newstatusobj = new OfflineStatusChangeMonitor
                    {
                        NIK = demoFromDedup.NIK,
                        NIKStatus = new Status { Code = demoFromDedup.CurrentStatus.Code },
                        RegionId = Convert.ToInt16(demoFromDedup.RegionId),
                        LocalId = demoFromDedup.LocalId,
                        Updatedtime = DateTime.Now,
                        ServiceName = "XXXXX"

                    };
                    idmsRepository.Add<OfflineStatusChangeMonitor>(newstatusobj);

where add functions code is as follows

 public void Add<ENTITY>(ENTITY entity) where ENTITY : EntityBase
    {
        this.UnitOfWork.CurrentSession.Save(entity);
    }

now in this situation how can i set the values of updatedtime to SYSDATE of Oracle

i can not do it in the data base as i have the db s in many locations and am updating the data from wcf service

  • 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-26T17:46:27+00:00Added an answer on May 26, 2026 at 5:46 pm
    public DateTime getdbdate()
            {
                var dt = this.UnitOfWork.CurrentSession.CreateSQLQuery("select sysdate from dual where rownum<2").UniqueResult();
    
                if (dt != null)
    
                    return (DateTime)dt;
                else           
    
                return DateTime.Now;
    
            }
    

    and then call this function to get the db date and then use this as the date time in your function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In short : I have 2 windows applications(written using .NET) and need to pass
Here's the situation: we have an Oracle database we need to connect to to
Here's the situation: We have some generic graphics code that we use for one
I have a very dramatic situation here. I need the android sdk and I'm
I have a situation where I need to take a quantity consumed from one
So, I have a situation where I need to pass in three values into
I have a situation here where I need to distribute work over to multiple
Briefly, here's the scenario. I have an ASP.NET application using forms authentication and a
I have what seems like an odd situation here. I'm launching dialogs from a
So I have a situation where I need to pass some parameters on url.

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.